doubt Tabstrip

wahnoma

New Member
hi, i have a question, use a tabstrip with multiple tabs, but depending on certain validations i want to start with a certain tab, what would the sentence to use?
use this but not work:
chventanas:TabStrip:Tabs:ITEM(2):SELECTED = TRUE

thanks!
 
Hi,

Here's some questions,

1) What's the error you get?
2) To what object chventanas refers to?
3) How are you initializing the control?

The code you post is ok, assuming chventanas is referring to the TabStrip control handle and had been properly initialized. So if you get an error that means there's something missing in the way you are
initializing or referencing the control.

Maybe you are trying to change the selected TAB before the widget it's realized.
For instance try putting your code after loading the control in the Main Block of your program,
just to test the code it's working as expected.

example.

RUN enable_UI.
chventanas:TabStrip:Tabs:ITEM(2):SELECTED = TRUE.

the procedure enable_UI should have something like this,

Procedure enable_UI:
RUN control_load. /* the procedure control_load should take care of the proper initialization of the
TabStrip control */
end.

Hope this helps!!!
 

wahnoma

New Member
1)maybe not a bug, but it looks like the tab begins with the first and then goes to the requested
2)Yes chventanas referred tabstrip
3)Control_Load is right
my idea is sometimes start with the tab 3, with 2 other times since the first tab, but apparently can not. At runtime, you can see how it begins with the first tab and then get to the request, eg to 3. This is not visually pleasing, besides having different fields
 
Hi,

I'm was confused with your first post
hi, i have a question, use a tabstrip with multiple tabs, but depending on certain validations i want to start with a certain tab, what would the sentence to use?
use this but not work:
chventanas:TabStrip:Tabs:ITEM(2):SELECTED = TRUE

So at first I though that you were having problems with the statement as such and that's why I ask you about the initialization of the control, but now it appears that what you are trying to achieve is to prevent the user for getting confuse if they see the first tab before the needed one.

I'm rigth?,

it so try this.

1) Hide the control until necessary

chventanas:TabStrip:VISIBLE = NO.

2) And when needed show the control.

For instance force the user to press a button so he/she can retrieve the TabStrip

Example.

ON choose OF Button-Show-TabStrip DO:
ASSIGN Which-Tab. <== FILL-IN TO CAPTURE THE DESIRE TAB NUMBER
chventanas:TabStrip:Tabs:ITEM(Which-Tab):SELECTED = TRUE NO-ERROR.
IF NOT ERROR-STATUS:ERROR THEN
chventanas:TabStrip:VISIBLE = YES.
END.



Hope This Helps!!!
 
Top