# GLUI replace one menu with another

This topic is 3563 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hey all. Still having some issues with GLUI, but the problem is different this time =).
GLUI *firstUI = GLUI_Master.create_glui_subwindow(windowHandler, GLUI_SUBWINDOW_LEFT);

GLUI *secondUI = GLUI_Master.create_glui_subwindow(windowHandler, GLUI_SUBWINDOW_LEFT);


If I use the code above to create a simple UI for my program, the to panels will appear next to each other on the left side of the main window - awesome, no problem. But I dont really want the two panels next to each other - I was hoping to make the secondUI replace the first one (same position). So for testing:
GLUI *firstUI = GLUI_Master.create_glui_subwindow(windowHandler, GLUI_SUBWINDOW_LEFT);

firstUI-&gt;hide(); // NEEDS to be called before the close command can be used.
firstUI-&gt;disable(); // Might be needed... not sure.
firstUI-&gt;close();

GLUI *secondUI = GLUI_Master.create_glui_subwindow(windowHandler, GLUI_SUBWINDOW_LEFT);


But this just removes the firstUI, and still places the secondUI some distance from the left border of the main window, as if the firstUI is still there. Annoying. Is there anyway, around this problem? So one menu can be replaced by another? The code above is just for example - I dont really care how the menu is replaced, as long as it stays on the same position as the old menu. Havn't been able to find that much information about how to use GLUI, other than the manual, and some very basic tutorials, which never really get to the point at which I'm stuck, so I hope someone here can lend a hand =) /kish

1. 1
2. 2
3. 3
Rutin
19
4. 4
5. 5

• 10
• 14
• 30
• 13
• 11
• ### Forum Statistics

• Total Topics
631782
• Total Posts
3002332
×