Can you add more tabs to a TABCONTROL on the fly.
What are you going to use the extra tabs for? Usually you use the tab control to move between different pages on a form. Adding a tab won't add a page to the form.
Try updating the TEXT property of the tab control.
Dave G
It is in the body of a form , as tab is clicked, the fields are filled from a hidden edittable.
Dont want to use an edit table(It is actualy hidden)
I was wanting to start with 2 tab, the second having label of , so wanted to add extra tabs etc etc- .
Tried the text angle - didnt change.
No biggy, will just have the max no of tabs that they wont exceed and show text with count.
Thanks
Ahhh, it worked.
Was using @vm, changed to @fm.
Now, how to change the values
Playing with STRUCTURE…looks like it might work
ooops…….ORIG_STRUCT
Looks cool.
Saving and retrieving the modified structure to/from "@STRUCT" for the control works like a charm. In test screen.
Now have to put recreate logic in real window for reading new records, etc etc
Got it all working creating tabs on the fly intialised from ORIG_STRUCT then saved on a single page form.
x=Utility("DESTROY", Win)
x=Utility("CREATE", Struct)
BUT, now when it is on say Page 2 of a form, it disapears.
Have I just hit a gotcha, or is there a way around.
tia
(Sorry about the bloggy type stuff)
Barry,
You can change the values via the VALUES property - in some ways the Tab control interface was modelled on the RadioButton so it has some similarities.
cpates@sprezzatura.com
Battlestar Sprezzatura - BSG 77
Colonial leaders in all things RevSoft
Geezes, next time I will wait for your side of the world to wake up , Thanks heaps.
In 8.8 no reference for VALUES
in 9.2.1 - Has VALUES and says used in TabControl.
Search by TabControl and no reference to VALUES. So, if you dont know you dont know
BUT, now when it is on say Page 2 of a form, it disapears. Have I just hit a gotcha, or is there a way around.
Insert obscure musical reference here…
Such an effort if he only knew of my plan. In just seven days, I can make you a man!
This is why we added the TabCount property.
Shameless plug aside, are you sure your structure has the PS All Pages style bit set? If not, I don't recall off the top of my head if this is something you can create within the structure. You might be able to set the PAGELIST property after the fact to make this work.
dbakke@srpcs.com
Barry,
To set the tabs within a tabcontrol you need to make two Set_Property calls. One updates the "TEXT" property for the text that is to be displayed on the control and one updates the corresponding "VALUE" property for the values of each tab. Both the "TEXT" and "VALUE" properties should be passed @fm-delimited arrays of data.
For Example:
tab_text=Tab 1" : @fm : "Tab 2" : @fm : "Tab 3"
tab_values=1" : @fm : "2" : @fm : "3"
void=Set_Property(theTabControl,'TEXT', tab_text)
void=Set_Property(theTabControl,'VALUES', tab_values)
I will update the Help to contain clearer examples.
I hope this helps,
Sean
]]]are you sure your structure has the PS All Pages style bit set?
No. I dont want it on all pages, only page 2.
This is how I approached it, and it is working like a charm.
Thanks for the 'Help' update.
No. I dont want it on all pages, only page 2.
Did you figure it out then?
dbakke@srpcs.com
Yes, by using TEXT and VALUES and push\pull the data depending on VALUE as a fm to the hidden table row.