cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Arbortext Customization and XUI dialog box

dgopois
12-Amethyst

Arbortext Customization and XUI dialog box

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?

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

5 REPLIES 5

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.

Top Tags