Hello

Hello,

have you ever heard about a bug on TToolBar with Grouped buttons ? (Tokyo 10.2.3)

I have a very strange behavior...on a form with a toolbar with a set of grouped toolbutton I call ToolBar.Buttons[0].Down := True to select the first button. It works well.

Now this form is used in an other big application, and on this same form, the call to "ToolBar.Buttons[0].Down := True" select, not the first button of the bar, but the button just before the currently selected one.

When I trace the code, there a

FToolBar.Perform(TB_CHECKBUTTON, 0, 1)
but then
Perform(TB_GETBUTTON, 0, TBButton) returns a fsState = 4, this is not a Down state while fsStyle is 6 (TBSTYLE_CHECKGROUP)

Any idea ?

Thanks

Comments

  1. OK, the buttons are created by code, and I don't know why, but setting the Parent at the very last moment fix the problem :/ the bug is probably in the UpdateButton code somewhere

    ReplyDelete
  2. TToolBar is more than less problematic component.Once tried to get small demo going on at home and everything just went tits up all the time.

    Don't remember did it yield at the end, but it was proper fight :)

    Delphi would need pretty simple toolbar that just would work. Preferably with form inheritance.

    Not too many features would be needed.

    ReplyDelete
  3. Tommi Prami the more I try to customize TWinControl, the more I feal comfortable with TGraphicControl...that's why I've done TGraphicControl and request for a Parent property on TControl :) (RSP-16543)

    ReplyDelete

Post a Comment