Recent

Author Topic: [semi solved] Button locked for new position after being removed from TCoolBar.  (Read 1269 times)

jamie

  • Hero Member
  • *****
  • Posts: 6735
I tried to use the TCoolbar. Dropped a Tbutton on it, that works as it creates a Band for it.

Using the Drag and Drop and/or methods to remove the button from the Coolbar and host it on the form or anywhere results in a button that refuses to reposition. It still showing on the Coolbar but not part of the coolbar and still is interactive.

 I can however, resize the button, I just am not able to give it a new home.

I walked the source code with the debugger and all indicates show that the new size is taking place but at the end of it all, it still refuses to move. Something is blocking it.

 I even tried using the windows MoveWindow, LockWindow, BeginBoundsUpdate etc..

 Please test the attached project. I really would like to use this, something is very strange about this.
« Last Edit: July 25, 2024, 08:56:23 pm by jamie »
The only true wisdom is knowing you know nothing

Hansvb

  • Hero Member
  • *****
  • Posts: 715
Hi Jamie,

I am not sure if you mean this but take a look at the attachment. You can drag button3 of the coolband to the form. And drag it back to the coolband.

jamie

  • Hero Member
  • *****
  • Posts: 6735
yes, that works, But I noticed you dropped it on a Ttoolbar, I was dropping it the form.

I'll go with for now because I already have a Toolbar on there and this was going to work with it.

There must be some sort of class mismatch for handling these controls.

I found that the TControlBar also works but it lacks a little for gaining access to the list of bands, needed for tracking the control.

I'll mark this thread as ok for now but there should be something in the TCoolBar to indicate a problem when being parented from a form.

Thank you.

The only true wisdom is knowing you know nothing

 

TinyPortal © 2005-2018