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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Toolbar Question

Status
Not open for further replies.

williamu

Programmer
Apr 8, 2002
494
GB
I want to add a Toolbar to my application that has a right justifed text box. So, should the User resize the form the text control is always at the right side of the bar.

Oh and just for good measure what about adding Comboboxes as well to the bar.

Is any of this Possible? If so I'd appreciate some pointers.


William
Software Engineer
ICQ No. 56047340
 
Use a Toolbar button with property set to Placeholder for all three of your requirements. A placeholder button set the same width as your textbox or combobox can be overlaid with the other control. Use the Buttons(x).Left , .Top properties etc.

To set a textbox at the right, put a placeholder toolbutton before the Textbox button and change it's width in the form_ resize event.

tb1.Buttons(4).Width = Me.Width - 5 * (tb1.Buttons(1).Width)

You'll need to change the figures to suit your placeholder button widths of course

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top