How to disable/enable a 'Textunderneath' style Button

Discussions related to custom development with Select.
Post Reply
BBenson
Posts: 44
Joined: Wed Feb 23, 2011 4:06 pm

How to disable/enable a 'Textunderneath' style Button

Post by BBenson »

I have a very simple toolbar button based upon the sample 'SimplePackage' project that resides on the ProFormTab next to the 'Orders' tab. I need to disable the button until an order is opened and can easily do that by setting the Button style to 'Dynamic' and wiring up an event handler, but I want the button to also look like the other buttons with the text underneath the image. The button style attribute can be one or the other, 'Dynamic' or 'TextUnderneath'.

Is there another way to accomplish both goals: 1.) disabled/enabled 2.) text under image?

<?xml version="1.0" encoding="utf-8" ?>
<CommandTable xmlns="http://schemas.softprocorp.com/select/s ... le/2008/02"
xmlns:cg="http://schemas.softprocorp.com/select/s ... en/2008/03"
package="79cd41b8-8937-4e54-8936-d97b66e58dcc"
cg:classModifier="NonPublic">

<Using href="C:\Program Files\SoftPro\Select SDK\Include\ProForm.cts" alias="pf"/>

<Symbols>
<Guid name="CommandSet" value="749D00F5-074D-46A0-93A3-6A2E25B5AFC5">
<ID name="MyMenu" value="3"/>
<ID name="MyGroup" value="1"/>
<ID name="MyGroup2" value="4"/>
<ID name="MyButton" value="2"/>
</Guid>
</Symbols>
<Commands>
<MenuRef id="pf:ProFormTab">
<Group id="MyGroup">
<Menu id="MyMenu" text="Elf">
<Group id="MyGroup2">
<!--style="TextUnderneath"-->
<Button id="MyButton" text="My Test" largeImage="MyIcon.png" style="Dynamic" />
</Group>
</Menu>
</Group>
</MenuRef>
</Commands>
</CommandTable>


base.RegisterHandler(Package.MyButton, MyButtonHandler, MyButton_QueryStatus);

Thanks,
Mark McKenna

Re: How to disable/enable a 'Textunderneath' style Button

Post by Mark McKenna »

You can combine them...

Code: Select all

<Button id="MyButton" text="My Test" largeImage="MyIcon.png" style="Dynamic TextUnderneath" />
BBenson
Posts: 44
Joined: Wed Feb 23, 2011 4:06 pm

Re: How to disable/enable a 'Textunderneath' style Button

Post by BBenson »

Great that was easy, thanks for the quick reply!

Bob
Post Reply