Specifying the default tab
by BigPapa · in Torque Game Engine · 12/13/2005 (10:49 am) · 4 replies
Hello gang,
I'm modifying the OptionsDlg.gui to use the GuiTabBookCtrl and GuiTabPageCtrl controls of TGE 1.4. For some reason, the last tab instead of the first one is the one that comes up by default when the Option dialog is opened. Does anyone know who to specify which tab should be the default?
Thx!
I'm modifying the OptionsDlg.gui to use the GuiTabBookCtrl and GuiTabPageCtrl controls of TGE 1.4. For some reason, the last tab instead of the first one is the one that comes up by default when the Option dialog is opened. Does anyone know who to specify which tab should be the default?
Thx!
#2
in the
Make sure you don't place this above any other setVisible() calls or they may counteract it.
12/13/2005 (1:46 pm)
I think it's actually in client/scripts/optionsDlg.csin the
function optionsDlg::onWake {
...stuff...
yourTabPageThing.setVisible(true);
...stuff...
}Make sure you don't place this above any other setVisible() calls or they may counteract it.
#3
@David - You are correct in that the last one is the one that gets the focus. I put the first tab in the last place but unfortunately that changed the order of the tab. Now it shows as the last tab.
12/13/2005 (7:55 pm)
@Midhir - I tried it but did work. Shame cuz it looked good.@David - You are correct in that the last one is the one that gets the focus. I put the first tab in the last place but unfortunately that changed the order of the tab. Now it shows as the last tab.
#4
In GuiTabBookCtrl.cc add the following:
This will allow you to select a tab from script.
02/16/2006 (7:33 am)
Hello all, I know this thread has been around for a little while but I have the solution.In GuiTabBookCtrl.cc add the following:
ConsoleMethod( GuiTabBookCtrl, selectPage, void, 3, 3, "(S32 index)")
{
object->selectPage(dAtoi(argv[2]));
}This will allow you to select a tab from script.
Torque Owner David Barr
Viola Interactive Ltd