Skip to main content
1-Visitor
December 10, 2010
Question

xui tabpanel: can I force one other than the first to be "selected" on window load?

  • December 10, 2010
  • 5 replies
  • 1681 views
I set an id on tabpanel and then try to;

dlgitem_set_focus($win, "mytabpanelid");
dlgitem_display($win, "mytabpanelid");
dlgitem_set($win, "mytabpanelid","ACTIVE",1);
dlgitem_set($win, "mytabpanelid","VISIBLE",1);

But no joy. The functions all return 1 but the first tabpanel in the series
is actually "selected" or displayed or "on top" if you know what I mean NOT
the one I'm attempting to call via its id.

--
Paul Nagai

    5 replies

    18-Opal
    December 10, 2010
    Hi Paul-



    Try setting focus to a control *on* the tabpanel rather than the panel
    itself.



    --Clay


    1-Visitor
    December 10, 2010
    Paul,



    If the id of the tabbox is "tabbox" and you want to select the second
    panel, try dlgitem_set_value(win, 'tabbox', 2);



    Yes, I know that this is hard to figure out.



    Tung




    naglists1-VisitorAuthor
    1-Visitor
    December 10, 2010
    dlgitem_set($clay,"beer","ACTIVE");

    That did it. Thanks!

    naglists1-VisitorAuthor
    1-Visitor
    December 10, 2010
    All of the sudden, I've got three choices. Thanks again, you rock!

    dlgitem_set(win, 'tabbox','VALUE',2);
    dlgitem_set_value(win, 'tabbox',2);
    dlgitem_set_focus(win,'controlontabratherthanthetabitself');

    Help on dlgitem_set_value states it is equivalent the the first example
    above.


    18-Opal
    December 10, 2010
    🙂