TToolButton Indeterminate state set to true by Delphi? (grays images)

201 Views Asked by At

I have discovered a weird issue with my Delphi XE4 program. I have a toolbar with some toolbuttons. They also have a dropdown. I have code like this:

  m_View_SideColumns.Enabled := TmpOptionEnabled_View_SideColumns;
  tb_View_Columns.Indeterminate := False;
  tb_View_Columns.Enabled := TmpOptionEnabled_View_SideColumns;
  {$IFDEF mymsDELPHI}
  tb_View_Columns.EnableDropDown := TmpOptionEnabled_View_SideColumns;
  {$ENDIF}

(The above is just one of multiple similar toolbuttons)

The above code is called ether explicitly on changes or when app is idle somehow.

What I have found is that sometimes Indeterminate is true...

I don't have code setting it true, so I think it is something that happens deep inside Delphi handling my toolbar with toolbuttons...

Update #1

Also worth noting. I first saw this issue after adding manifest support for Windows 10 ... So maybe related since I have otherwise been using my software for 10 years across Windows versions without ever noticing his issue.

Could also be a Windows 10 update changed something.

Update #2

Seems related to clicking toolbarbuttons/dropdowns and the EnableDropDown setting.

If I do not touch EnableDropDown (setting it to true) problem does not happen when clicking buttons...

0

There are 0 best solutions below