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

how to deal with seperators in toolbar

Status
Not open for further replies.

Nifrabar

Programmer
Mar 16, 2003
1,343
NL
Hi to all.
Is there a simple trick to relocate seperators within toolbars?
I can drag one from lib to toolbar but relocating one is difficult.
Any trick?
-Bart
 
If you're talking about in the IDE, use the property sheet to select them. That makes a drag handle visible and I haven't had any trouble dragging them around.

If that's not what you're after, can you elaborate?
 
Bart,

Dan is right ... select them in the property sheet. But, even then, it's not always easy to work with them. If you resize the toolbar at design time, the separators may relocate themselves in unexpected ways.

If you want much closer control over the layout of the toolbar, place a container in it. In the toolbar's Resize, write code to resize the container so that it exactly fills the toolbar. Then place the buttons and other controls inside the container. That way, you will be able to position the control almost exactly where you want it.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Hi Dan and Mike,
Thanks for reply.
Dan's solution is not that easy to use; just as Mike says :
<<If you resize the toolbar at design time, the separators may relocate themselves in unexpected ways.>>
That's exeactly I experienced.
Mike do I understand you write that you advice to place buttons inside a container?
Will give that a try!
-Bart
 
Bart,

Yes, you understood me correctly.

I'm not saying that you should always place the buttons inside a container. It's just for cases where you want closer control over the layout of a toolbar.

If the toolbar just contains a simple series of buttons, it's not so important. The benefit of the container comes when you have various different controls, and you want to position them in a particular way.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Hello Mike,
I tried this solution and indeed it does what I like to achieve.
Thanks for solution!
-Bart
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top