Recent

Author Topic: ToolButton order different after compilation then in designer  (Read 3084 times)

krzynio

  • Full Member
  • ***
  • Posts: 110
    • Krzynio's home page
Lazarus 1.1 on  Windows 7 x64.

Toolbar with several ToolButtons.
After compilation toolbutton order on the toolbar seems to be random and completely different than in designer.

I found a path and info that problem was fixed in version 0.9.23 here:
Quote
http://bugs.freepascal.org/view.php?id=8832
but in my case it still exists.

I also compiled the source on LMDE x64 and there everything is fine.

Can somebody help or suggest any solution? Please.

Now I am using panel with bitbuttons but it is rather temporary solution which doesn't automatically change position (do not move buttons from right to left) when a button in the middle is hidden.

Regards,
Krzysztof
Debian 12.8 x64, / Windows 11 PL - latest updates
Lazarus 3.6

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: ToolButton order different after compilation then in designer
« Reply #1 on: May 25, 2013, 08:48:57 pm »
I experienced this in past too. When you want to configure tool buttons and you make some button hidden and then visible, it does not appear on its original position but always in the end.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

krzynio

  • Full Member
  • ***
  • Posts: 110
    • Krzynio's home page
Re: ToolButton order different after compilation then in designer
« Reply #2 on: May 25, 2013, 08:57:30 pm »
Thanks for quick answer!
This may be a trail for me.
I will try to control toolbutton order by order of hiding and making visible buttons.
Debian 12.8 x64, / Windows 11 PL - latest updates
Lazarus 3.6

krzynio

  • Full Member
  • ***
  • Posts: 110
    • Krzynio's home page
Re: ToolButton order different after compilation then in designer
« Reply #3 on: May 25, 2013, 09:24:20 pm »
I tested this after you suggestion.
It seems that you are right.
Original order is destroyed after hiding and making visible the button.
When I had replaced Visible property with Enabled the order was not disrupted.
But after hiding and making visible the order seems to be random and not always last unhidden button is positioned at the end.
I tested it by hiding and making visible a button from the middle as last operation in code and order was changed but button was moved only one position right not to the end. I did it also with another button from the middle and its position was unchanged.
Debian 12.8 x64, / Windows 11 PL - latest updates
Lazarus 3.6

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: ToolButton order different after compilation then in designer
« Reply #4 on: May 25, 2013, 09:28:28 pm »
IIRC there is some trick that you can make all buttons invisible and then you make them visible in reversed order and they will appear in the right order. It worked for me in past. It is probably the same what is mentioned in that bugreport.
The reason is probably that Lazarus streams the buttons to *.lfm file in order of their creation and not in order of their appearance on a toolbar.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

 

TinyPortal © 2005-2018