W7 Toolbar Buttons

Hi,

Using the new W7 toolbar and toolbar buttons and having an issue with enabling and disabling in code. When disabled in the IDE at design time and run, behaviour is normal. When button is disabled in code at runtime, the control paints like it is disabled, but still allows the button to be focused and clicked, giving an error "Cannot focus a disabled or invisible window".

Regards

Are you using the latest version of the components?

We can't reproduce a problem here with code:

procedure TForm4.Button1Click(Sender: TObject);
begin
  W7ToolButton1.Enabled := not  W7ToolButton1.Enabled;
end;

this behaves as expected. The button can't be clicked when disabled and doesn't cause an error.

Installed 6.1.5.0 component pack on Delphi XE, the toolbar button version is 1.0.1.0. Interesting it doesn't happen for you, I grabbed your W7 demo form and set the button to disable at runtime with the same result, so it wasn't just in my app.

If it helps  I can send that form and the compiled demo so you can see it happen.

Regards

Are you sure you first did a complete uninstall? The latest version we have in our distribution packages is 1.0.1.1.

Fixed in v1.0.1.1 : Issue with changing Enabled property from OnClick event

Though I had! will go and clean out the cupboard so to speak... 

Just did a complete re-install (using uninstall provided and confirmed all files were removed)and re-install and still have version 1.0.1.0 of that component on my form! is it possible to get the upgraded version as it looks like it didn't get included in my version 6.1.5.0 component pack.

Question was answered by direct email.