Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can somebody help me with label controls....

Status
Not open for further replies.

EdRev

Programmer
Aug 29, 2000
510
US
I've been trying to drop a label on either an SSab or a picture box to no avail, the label doesn't seem to stick on the surface of these containers unlike a textbox.

Also, can somebody tell me how to separate controls on each tab of an SSTab.

Any help will be greatly appreciated.



any helf will be greatly appreciated

 
I believe the container (SSTab or Picture box) must be created on the form first, and then the label created and added to it. OR, cut an existing label from a form, select the sstab tab you want the label to sit on, and then paste the label to that selected tab. (It's important to have the desired tab selected). Dragging an existing label from the form to an sstab tab has never worked for me.

Hope this is the information you were looking for :eek:)
 
When you can't get the controls to stick to the correct tab, I usually do a cut and paste on them. -- select the naughty control, cut it, select the tab on the tab control (make sure it's got the resize handles present), then paste.

The idea is to make sure the tab control has the focus before doing the paste. Otherwise it ends back up on the form, or on some other unwanted control (like in a frame).

Chip H.
 
thanks guys,

good 'ole cut n' paste has done it again. Now, can somebody tell how to make some control, say a textbox remain hidden, until the tab that contains them get selected. I drop a textbox on tab 2, but when I run the form, the textbox persist on all the tabs.

thanks again guys.
 
This problem occurs even if u double click the label control rather than drag and drop it on the tab control
 
Ed,
A control should only been seen on it's container tab. If the same control is visible on all the tabs, then something is amiss. (The control is still part of the form and not the SSTab) Chips directions should do the trick for you. Remember, after cutting the txtBox from the form, make sure to select the SSTab control, AND select the desired tab before pasting the control.

 
Ed -

When you drag a control from the toolbox onto your form window, it's parent is the form (by design). If you want the control's parent to be a tab control, you've got to explicitly cut it, select the tab control, then paste. That way the control's parent gets set to the tab control like you wanted.

Same applies to a frame, Sheridan 3-D panel, or other container object.

Chip H.
 
thank you all for your feedback! now i'm getting the hang of it. one last question though, before i put this topic behind (at least for now). is there a way i can change the background color of the tabs (not the backcolor)? it's kinda hard to work with system color, you wouldn't know how to set the colors of the other controls.

thanks again all!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top