Page 1 of 1

GUI problem

Posted: Tue Jun 01, 2004 9:41 pm
by ZDeveloper
I create GUI Element and some buttons etc.
But now I want to delete the buttons or to move them or to make them invisible.

How can I do that?

Posted: Wed Jun 02, 2004 7:20 am
by fnolis
the method remove() and setVisible() exists in baseclass IGUIElement...

Posted: Wed Jun 02, 2004 7:21 am
by joy
Hi,

do you want to delete and move buttons dynamicly? I mean do you run your program and than the user should be able to move and delete buttons? If yes I would solve this by I menu like in the techdemo. By clicking the object there should open a menu to delete the button. If you say yes you just need to drop() the button. Moving is a little bit more comlicated, because you have to write a drag and drop routine. I think you can take that from some examples too, because a button is a GUI Element too.

Could I help?

Posted: Wed Jun 02, 2004 2:25 pm
by ZDeveloper
No I want to have it static.
Thanks for help. I will try remove and setInvisible.

Posted: Wed Jun 02, 2004 2:58 pm
by Tyn
Not a good idea to drop() the button, it usually causes a crash. Let device->drop() deal with the cleaning up, just use remove() to remove permanantly or setVisible() to be able to switch between them.

Posted: Wed Jun 02, 2004 6:42 pm
by ZDeveloper
setVisible() works.

but remove make a problem.
first my text disaper, it is ok, but then the program ends because of an error.