Results 1 to 3 of 3

Thread: Dynamically generate GUI buttons,labels and stuff

  1. #1

    Question Dynamically generate GUI buttons,labels and stuff

    I tried to use your SDK for a little kiosk application. The thing i need is to put the several screens (AKA gui windows) in a resource file and load them dynamically through ComponentManager. Unfortunately i found no way of doing that because all objects must be declared somewhere. Can you help me on this? can i generate dynamically a window only by specifiying the window comps in XML resource file?


    regards,

    iulian

  2. #2
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Bergen, Norway
    Posts
    588

    Default

    Check out the GUIScript example.

  3. #3

    Smile GUIScript sample

    Thank you for your post. I already checked that and the main reason on choosing clanlib was that i saw the xml definitin of GUI interface. let me tell you a little about my project. It consists of a user interface with several screens. These screens contain only buttons and ocassionaly some listboxes. All windows are toplevel and i need to show them programatically in dependency with some network or functional operations. The main problem is this i need to program the screens only in xml file and i do not want to recompile each time my application.
    so far i was able to run that demo with my first window but i do not know how to delete that window and construct the second or hte next one. I attach a small sample of a demo xml file to be more clear.
    |--------------------------------------

    ?xml version="1.0" encoding="latin-1" ?>
    <resources>
    <components name="screen0000">
    <window name="window1" x="0" y="0" title="">
    <components>


    <button name="button1" x="10" y="125" text="Auto sized button" />

    <button name="button2" x="10" y="225" text="Auto sized button" />

    </components>
    </window>
    </components>
    <components name="screen0002">
    <window name="window1" x="0" y="0" title="">
    <components>


    <button name="button1" x="10" y="125" text="Auto button" />

    <button name="button2" x="10" y="225" text="Auto button" />

    </components>
    </window>
    </components>

    </resources>

    |------------------

    so i need once to load screen0000 and after a time or event like a button press to go to the next screen screen0001.

    a sample code would be great.

    thank you in advance for all your help

    Iulian Demetrescu

Similar Threads

  1. fqmods.cjb.net back with some new stuff.
    By in forum Funeral Quest
    Replies: 4
    Last Post: 10-20-2004, 05:25 PM
  2. HELP!!! how can i grab stuff!!!
    By in forum Dink Smallwood HD
    Replies: 2
    Last Post: 11-24-2003, 08:50 AM
  3. Some stuff on the servers
    By in forum Funeral Quest
    Replies: 1
    Last Post: 07-18-2003, 01:10 PM
  4. New Attack Info Stuff?
    By redink1 in forum Funeral Quest
    Replies: 4
    Last Post: 01-14-2003, 12:28 AM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •