Tab manipulation

Hi,

Is there a way to update tab values (the string shown on the tab selection) once a Dialog box has been shown?

I can select different tabs using set, but cannot find a way to reference a particular tab when changing its value. If I use

set(dialogBox, 1, "new value")


it comes up with an error saying the DBE is not a slider.

Alternatively/in addition, is there a way to show/hide specific tabs?

Thanks,
Simon


SystemAdmin - Tue May 11 04:53:15 EDT 2010

Re: Tab manipulation
Mathias Mamsch - Tue May 11 11:48:43 EDT 2010

Hmm ... found no DXL way either ... How important is this? You could use black magic to do it (directly manipulate the tab), you could also go the awkward way of creating a whole bunch of +tab+s, which you hide and show depending on your conditions. Or you could just try to achieve an acceptable result by any other GUI way (a frame that you rename, or something like that). If you need help on any of the suggested solutions, just check back. Regards, Mathias

Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: Tab manipulation
SystemAdmin - Wed May 12 04:20:48 EDT 2010

Hi Mathias,

Thanks for the reply - glad I didn't miss a simple way of doing it! I used a drop down list (choice) in the end, which was not as neat but it worked.

Just to check, is your suggestion to create lots of tab DBEs then show/hide them rather than showing/hiding individial tabs within one DBE? If it's creating lots of DBEs I know how to do that.

I found in the dxl help, within the set (value or selection) section, it says you can set a 'tab strip' with a string which 'Sets the selected tab'. It says the same when using an integer, which I have used to select a specific tab number, so it appears you should be able to set a string somewhere on the tab, I just cannot work out where!

Thanks,
Simon

Re: Tab manipulation
Mathias Mamsch - Wed May 12 11:27:02 EDT 2010

SystemAdmin - Wed May 12 04:20:48 EDT 2010
Hi Mathias,

Thanks for the reply - glad I didn't miss a simple way of doing it! I used a drop down list (choice) in the end, which was not as neat but it worked.

Just to check, is your suggestion to create lots of tab DBEs then show/hide them rather than showing/hiding individial tabs within one DBE? If it's creating lots of DBEs I know how to do that.

I found in the dxl help, within the set (value or selection) section, it says you can set a 'tab strip' with a string which 'Sets the selected tab'. It says the same when using an integer, which I have used to select a specific tab number, so it appears you should be able to set a string somewhere on the tab, I just cannot work out where!

Thanks,
Simon

My suggestion would be to find another GUI way, without having to change the heading of the tab strips. The other way would be to create lots of tabs (which gets awkward with more than 2 i guess).

You can use set(DBE tab, string s) to select the tab labelled with the string s which is the same than doing set(DBE tab, int nr) where nr is the tab you want to select.

I guess achieving your original goal is not possible with pure DXL (except, you write your own tab element using a canvas. I did this with a spreadsheet. Yuck, that was ugly.). Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: Tab manipulation
SystemAdmin - Tue May 18 06:20:15 EDT 2010

Mathias Mamsch - Wed May 12 11:27:02 EDT 2010
My suggestion would be to find another GUI way, without having to change the heading of the tab strips. The other way would be to create lots of tabs (which gets awkward with more than 2 i guess).

You can use set(DBE tab, string s) to select the tab labelled with the string s which is the same than doing set(DBE tab, int nr) where nr is the tab you want to select.

I guess achieving your original goal is not possible with pure DXL (except, you write your own tab element using a canvas. I did this with a spreadsheet. Yuck, that was ugly.). Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Hi Mathias,

Thanks for the reply. I see how string is used with set now. It seems a bit irritating that you cannot show/hide specific tabs because, as you said, create lots of tabs will start getting awkward.

I'll use a different way.

Thanks,
Simon

Re: Tab manipulation
SystemAdmin - Thu Oct 07 10:21:53 EDT 2010

Mathias Mamsch - Tue May 11 11:48:43 EDT 2010
Hmm ... found no DXL way either ... How important is this? You could use black magic to do it (directly manipulate the tab), you could also go the awkward way of creating a whole bunch of +tab+s, which you hide and show depending on your conditions. Or you could just try to achieve an acceptable result by any other GUI way (a frame that you rename, or something like that). If you need help on any of the suggested solutions, just check back. Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

How can i possibly hide and show a single of many tabs?

Re: Tab manipulation
Mathias Mamsch - Fri Oct 08 07:18:33 EDT 2010

SystemAdmin - Thu Oct 07 10:21:53 EDT 2010
How can i possibly hide and show a single of many tabs?

I think you can't, only if you create a bunch of different tabs. See other posts in this thread. Regards, Mathias

Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: Tab manipulation
SystemAdmin - Fri Oct 08 08:10:01 EDT 2010

Mathias Mamsch - Fri Oct 08 07:18:33 EDT 2010
I think you can't, only if you create a bunch of different tabs. See other posts in this thread. Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

By creating a bunch of different tabs means, an element for each tab, to be able to manipulate it, instead of creating an array with multiple tabs names?

DB box = create "Test" 
void tabSelected(DBE theTab){
    int i = get theTab
} 
string items[] = {"A"} 
string items2[] = {"B"} 
DBE theTab = tab(box, items, 300, 200,tabSelected) 
DBE theTab2 = tab(box, items2, 300, 200,tabSelected) 
 
//theTab->"top"->"form" 
//theTab->"left"->"form" 
//theTab->"bottom"->"form" 
//theTab->"right"->"unattached"
 
show box

Re: Tab manipulation
Mathias Mamsch - Sun Oct 10 10:52:34 EDT 2010

SystemAdmin - Fri Oct 08 08:10:01 EDT 2010

By creating a bunch of different tabs means, an element for each tab, to be able to manipulate it, instead of creating an array with multiple tabs names?

DB box = create "Test" 
void tabSelected(DBE theTab){
    int i = get theTab
} 
string items[] = {"A"} 
string items2[] = {"B"} 
DBE theTab = tab(box, items, 300, 200,tabSelected) 
DBE theTab2 = tab(box, items2, 300, 200,tabSelected) 
 
//theTab->"top"->"form" 
//theTab->"left"->"form" 
//theTab->"bottom"->"form" 
//theTab->"right"->"unattached"
 
show box

Worse. I mean creating a tab with all the combinations for the tabs you want to hide, putting them all at the same position showing them when applicable. This might be worth it, if you want to show/hide one tab regarding to a condition, but doing this for renames or for more flexible things gets to awkward. Regards, Mathias
 

DB box = create "Test" 
void tabSelected(DBE theTab){
    int i = get theTab
} 
 
string items[] = {"A","B"} 
string items2[] = {"B","C"} 
string items3[] = {"A","C"} 
 
 
DBE theTab =  tab(box, items, 300, 50,tabSelected) 
DBE theTab2 = tab(box, items2, 300, 50,tabSelected) 
DBE theTab3 = tab(box, items3, 300, 50 ,tabSelected) 
 
theTab->"top"->"form"; theTab->"bottom"->"form" 
theTab->"left"->"form"; theTab->"right"->"form"
 
theTab2->"top"->"form"; theTab2->"bottom"->"form" 
theTab2->"left"->"form"; theTab2->"right"->"form"
 
theTab3->"top"->"form"; theTab3->"bottom"->"form" 
theTab3->"left"->"form"; theTab3->"right"->"form"
 
 
void hideCFunc (DB x) { hide theTab2; hide theTab3; show theTab }
void hideAFunc (DB x) { show theTab2; hide theTab3; hide theTab }
void hideBFunc (DB x) { hide theTab2; show theTab3; hide theTab }
 
apply (box, "Hide A", hideAFunc) 
apply (box, "Hide B", hideBFunc) 
apply (box, "Hide C", hideCFunc) 
 
show box

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

Re: Tab manipulation
SystemAdmin - Mon Oct 11 10:04:58 EDT 2010

Mathias Mamsch - Sun Oct 10 10:52:34 EDT 2010

Worse. I mean creating a tab with all the combinations for the tabs you want to hide, putting them all at the same position showing them when applicable. This might be worth it, if you want to show/hide one tab regarding to a condition, but doing this for renames or for more flexible things gets to awkward. Regards, Mathias
 

DB box = create "Test" 
void tabSelected(DBE theTab){
    int i = get theTab
} 
 
string items[] = {"A","B"} 
string items2[] = {"B","C"} 
string items3[] = {"A","C"} 
 
 
DBE theTab =  tab(box, items, 300, 50,tabSelected) 
DBE theTab2 = tab(box, items2, 300, 50,tabSelected) 
DBE theTab3 = tab(box, items3, 300, 50 ,tabSelected) 
 
theTab->"top"->"form"; theTab->"bottom"->"form" 
theTab->"left"->"form"; theTab->"right"->"form"
 
theTab2->"top"->"form"; theTab2->"bottom"->"form" 
theTab2->"left"->"form"; theTab2->"right"->"form"
 
theTab3->"top"->"form"; theTab3->"bottom"->"form" 
theTab3->"left"->"form"; theTab3->"right"->"form"
 
 
void hideCFunc (DB x) { hide theTab2; hide theTab3; show theTab }
void hideAFunc (DB x) { show theTab2; hide theTab3; hide theTab }
void hideBFunc (DB x) { hide theTab2; show theTab3; hide theTab }
 
apply (box, "Hide A", hideAFunc) 
apply (box, "Hide B", hideBFunc) 
apply (box, "Hide C", hideCFunc) 
 
show box

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

Thanks a lot for the clarification. I know now that is not possible for what I already have implemented. Too bad. This is probably a possible enhancement.

Have a great day!