Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
I created a XUI dialog box which contains an object "tabbox" (panel) including two objects "tabpanel" (tab).
In ACL language, how to recover the name of the active tab (tabpanel) when the dialog box is open?
Solved! Go to Solution.
Hi David--
It depends on whether you are accessing it via dlgitem_* functions or via the XUI document structure directly.
If you are using dlgitem_* functions, you can do it by setting an ID on the <tabbox> element, and using
local tabindex = dlgitem_get_value(dlgwin, "myTabBoxID")
where dlgwin is the window ID of the dialog, and "myTabBoxID" is the ID string you assigned to the <tabbox> element. It will return an index indicating which tab is selected (by count, e.g. "1" for the first tab, "2" for the second, etc.).
If you are using XUI structure, you can just use the usual document interrogation methods:
local oids[];
oid_find_child_attrs(oid_root(dlgdoc), oids, "id", "myTabBoxID");
local tabboxoid = oids[1];
local tabsel = oid_attr(tabboxoid, "selection");
--Clay
Hi David--
The easiest way to find the answers to questions like this is to view the dialog as you edit it. To to this, load the XUI document in editor, and then from the menus choose Tools->View Dialog. This will show the rendered version of the dialog. Anything you change in the dialog will be reflected in the XUI document in the editor window, and vice versa.
In this case, load the XUI document, use View Dialog to show it, and switch back and forth between the tabs, noting how the markup changes each time you switch tabs.
--Clay
Clay,
Thanks for your help.
Do know what ACL function, I must use to retrieve the value of the attribute "selection" of a tabbox control ?
David
Hi David--
It depends on whether you are accessing it via dlgitem_* functions or via the XUI document structure directly.
If you are using dlgitem_* functions, you can do it by setting an ID on the <tabbox> element, and using
local tabindex = dlgitem_get_value(dlgwin, "myTabBoxID")
where dlgwin is the window ID of the dialog, and "myTabBoxID" is the ID string you assigned to the <tabbox> element. It will return an index indicating which tab is selected (by count, e.g. "1" for the first tab, "2" for the second, etc.).
If you are using XUI structure, you can just use the usual document interrogation methods:
local oids[];
oid_find_child_attrs(oid_root(dlgdoc), oids, "id", "myTabBoxID");
local tabboxoid = oids[1];
local tabsel = oid_attr(tabboxoid, "selection");
--Clay
Hi Clay,
Your first solution (dlgitem_* functions) is the good solution for me.
Thanks for your help.
David
David,
Did the information provided assist you with resolving your problem? If so, could you updated the discussion with "Correct" answer, so that the community knows what the resolution was. Also, please add additional information that you may be helpful to the community.