|
-
Sep 16th, 2022, 11:17 AM
#11
Fanatic Member
Re: CommonControls (Replacement of the MS common controls)
Toolbar problem with .DisabledImagelist
When a button is set to enabled = false by code the button shows the correct image.
This does not work when the button is TbrButtonStyleCheck + .Value = TbrButtonValuePressed.
See attached sample to play with:
2022-09-16_Toolbar.zip
EDIT:
MSCOMTL's toolbar shows the same behavior as in VBCCR17.
On Enabled = false for a button, the button style has to be default.
Otherwise the image from the .DisabledImagelist is not used.
Before setting Enabled = false, style and value must be stored for Enabled = true.
I wrote a helper function that stores the style and state of a button before appling the image.
It uses the button Tag to store the values.
This kind of works ok, but the Tag property is lost for other uses.
Ok, I could use a companion list instead of the Tag.
Bad is that this list has to be refreshed on every ButtonClick.
---
The problem is solved so far, but it is a cumbersome approach.
My wish is that VBCCR17's toolbar button uses the .DisabledImageList independent from the state and style of the button.
Something to play with:
2022-09-21_Toolbar.zip
Last edited by Karl77; Sep 21st, 2022 at 07:06 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|