I want to create a custom TAdvOfficeToolSelector. That means, disabling its provided popup and creating my own. I've already created my own popup, works fine with a button or TSpeedButton.
How do I add my own Popup.Show(); to the TAdvOfficeToolSelector?
I've tried adding it to OnDropDown and OnDropDown close event but its own popup messes up display of my own.
Later, I discovered AdvOfficeToolSelector1.BlockDropDown(true). Is that the solution and then using OnDropDown event?
Great, except that one crashes.
Access violation at address 008C457C in module 'Project1.exe'. Write of address 000003F5.
TAdvOfficeToolSelector is designed to allow selecting an item from the tools collection. It was not designed to somehow override / block / interfere with this default behavior.
If you want to show a popup when clicking a button, a possible solution is to do this directly from a button, for example a TAdvGlowButton which you can configure to use the same colors as TAdvOfficeToolSelector.
Thanks, I tried TAdvGlowButton but if I use OnDropDown event (to display my popup form), it also triggers OnClick event. That doesn't seem right. OnClick should be triggered when the button part of the button is clicked and OnDropDown when dropdown part of the button is clicked. By contrast, if only the button is clicked the OnDropDown is not triggered.
Is this by design? If so, can I make it only trigger the specific event based on which part of the button is clicked and not both of them?