the master
01-05-2008, 04:35 PM
Hi. Ive got an SSTab in my project. The first tab has a frame which contains a few objects. The second tab is blank and the last 3 tabs have labels on them. At design time everything looks fine but when i run the app all 3 of those labels appear on the first tab. They dont appear on the second and they do appear seperately on their own tabs.
Is there any reason they are appearing on the first tab? Can i do anything to stop them?
the master
01-05-2008, 04:50 PM
Ive done a bit of checking and ive found out why things are appearing on the wrong tabs. If im viewing tab1 and i move a control on tab3 then that control will permenantly appear on tab1 aswell.
I still dont know a good way to stop it. I could check if the tab is visible and only move objects if it is but im hoping for a better way if anyone has one
mkaras
01-05-2008, 05:09 PM
SSTab's are kind of a pain. At run time the controls on "other tabs" are hidden by subtracting some big offset value from the location coordinate of the control. When you try to apply settings to the control location coordinate you end up messing up the displayed/non-displayed state if you cause the negative offsets to become messed up by overwriting their values.
You may have some success if you note controls that have a negative offset in a location coordinate and try to retain that offset while you are trying to change the control location.
the master
01-05-2008, 05:16 PM
Are you saying that the controls arnt hidden but simply moved out of sight? Does that mean a user could still tab to them if they wanted?
mkaras
01-05-2008, 11:37 PM
Some tests may be necessary to determine actual behavior. It would not be logical however if the out of site controls supported being tabbed to.
the master
01-06-2008, 04:45 AM
Thats what i was thinking. It would cause problems here as some tabs are hidden to prevent users using those controls. Would it be better to use the tab strip control with a seperate picture box for each tab that gets shown/hidden?
wbeard52
01-06-2008, 05:57 PM
The hidden controls are capable of being tabbed too. You will need to place code in your lost focus event to cause the tab to work properly.
Private Sub textboxTab1_LostFocus(Index as Integer)
If Integer = 9 then textboxTab1(1).setfocus
End Sub
the master
01-07-2008, 12:20 AM
wbeard52. I am using SSTabs. They are like property window tabs not a tab stop
wbeard52
01-07-2008, 05:33 PM
I understand what the question is and what SSTabs are. The controls that are off the screen are able to be tabbed too and I gave you a solution to fix this situation. Try it and you will see what I am talking about.
the master
01-08-2008, 12:50 AM
I think i can see where you are going with that. I dont really want object that are hidden off screen somewhere. I wanted them to be .visible=false. Using the lost focus event will be like coding my own tabstop sub that decides who gets focus next. That ofcourse means a lot of coding and prevents shift+tab from working. It would be a lot easier to put the whole lot in a picture box and hide it.
I think the SSTabs are good as long as none of the controls move and all the tabs are shown to the user but i think i need to use pictureboxes for this app