Toolbar problem

Post your Gambas programming questions here.
Post Reply
User avatar
cogier
Site Admin
Posts: 1124
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Toolbar problem

Post by cogier »

Can anybody tell me how to get add a spring to a ToolBar (gb.form.mdi). I can add one at run time while using the configure option but how to I do it in the IDE?

Image

Image
User avatar
Quincunxian
Posts: 173
Joined: Sunday 25th June 2017 12:14am
Location: Western Australia

Re: Toolbar problem

Post by Quincunxian »

Hi Cogier,
Unless I have misunderstood the problem, this worked for me on Mint 20.

Added a toolbar to a form.
Added several toolbuttons and a single checkbox, seperated by a spring.
Ran the test and they were spaced as required.

Have I missed something ?
Attachments
Screenshot from 2020-11-29 06-59-20.png
Screenshot from 2020-11-29 06-59-20.png (4.97 KiB) Viewed 3506 times
Cheers - Quin.
I code therefore I am
User avatar
Quincunxian
Posts: 173
Joined: Sunday 25th June 2017 12:14am
Location: Western Australia

Re: Toolbar problem

Post by Quincunxian »

Additionally:
Found something interesting.
I had an existing 'tool bar' and added a spring and it did not work in the way I expected.
When I checked the hierarchy tab in the GUI, I found that the spring was last on the list for the container. ( a panel in this case)
I moved the spring up to where it should be in the sequence of the controls and it worked.
This may be just a coincidence and unrelated to your problem , but may be worth checking.
Cheers - Quin.
I code therefore I am
cage
Posts: 123
Joined: Monday 2nd September 2019 5:47am
Location: Phoenix Arizona

Re: Toolbar problem

Post by cage »

Quin that solved a problem I was having too. Many times I had a problem with the spring but never thought to look in the hierarchy tab. Thanks for that tid bit.
User avatar
cogier
Site Admin
Posts: 1124
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Toolbar problem [SOLVED]

Post by cogier »

Well, would you believe it! I put the spring back to test out Quincunxian's theory and it all worked as expected :( :D . I think, like cage found out, you were probably correct in that the hierarchy was wrong but I can't confirm it now! The time I spent trying to get this right.... winge!

Thanks I'll try to remember this for next time.
Post Reply