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

Toolbar icons question

Status
Not open for further replies.

pierrotsc

Programmer
Nov 25, 2007
358
US
I am really using almdev toolbar with speedbuttons but this behavior may also be the same with Delphi's toolbar.

I have 15 speedbuttons on a toolbar and i do not need all of them to show up all the time depending on which function i am trying to achieve.

I looked in the dfm to see in which order they were created and i am hiding/un hiding all or some of them.

What drives me crazy is that when i decide to show them all after only one was visible, most of them are not in the order they are showing in the IDE.

How can i make them show the way they are designed in the IDE?

I hope i am making sense but i am very confused.
Thanks.
P
 
If the toolbar works the same as other containers then you can change the .left (or .top) of the buttons to 'insert' then where you need them.

For example, if you have 10 buttons and they all have a width of 20 then if you change the .left property of a button to 11 it will insert itself before the second button on the toolbar.

This doesn't directly answer your question but might give you a workaround. Perhaps you can force all of the buttons into the preferred order at the start of your application and that order will remain.
 
Well, i may have found on how it works. When i look in the dfm, i can see the order they were created although it may not be the order they are showing.
It looks like i have to display them all the way they were created and then hide the ones I want. If i do not display them all first, then they go in a different location.

I guess i am the only one with this question/issue.
So far, it looks like it is working.

I do have all the icons with the left property.

P
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top