Toggle button on custom ribbon tab is running code, but not updating its interface - excel

I have a Toggle button on custom ribbon tab. When I mouse click on button, its interface is updating correctly (i.e turning little dark when toggled). But I need to set its value dynamically using code. When I update its value by using TB_onAction or TB_getLabel, code is running fine but the interface is not updating (i.e button is not turning into dark color, only label is changing). Is there any solution for this?

Related

How do I change format on ActiveX Control Option Button when selected?

When I select the ActiveX Control Option Button the entire border (box) becomes highlighted. Is there a way to fix this, perhaps change something in Properties, so when I select the button nothing is highlighted?
It is not clear what you mean by "select the button".
If you mean to click on it, have you tried setting the "TakeFocusOnClick" property to False?
Once you've set the property, click the DesignMode button to get out of Design Mode.
The original question is about a "control option button" which is presumably the Option Button. While the 'Command Button' has a TakeFocusOnClick attribute, the Option Button surprisingly does not. Neither does the Check Box.
This property does not appear on the Properties list on the worksheet in Design Mode or on the auto-complete list in the VBA editor, even though they will both take focus on click.
NOTE: ActiveX buttons are far more flexible than the stock "form controls" that appear at the top of the 'Insert' dropdown panel.

Title bar tab active with Bootstrap in XPages

I'm starting a new xpages project, and I'm going to use the bootstrap. I will use application Layout with responsive bootstrap configuration. I will use the 'Title bar' property. I'm doing tests but I have not found a solution to keep the active tab of the active title bar highlighted with another color. What happens is that when clicking on a certain tab of the title bar, it changes color, for the color defined for active tab, however, when I select any option in the navigation bar, the link to the color set for the tabs not selected. I have already tried using the navigationPath property, which works with OneUi layout, but with no bootstrap. Does anyone know how to solve this problem?

CRM 2011: enable/disable a ribbon button on condition

I am new to CRM and I have an exiting ribbon button. I want to disable it on condition (Field1 is null or not).
So far, I have created an new solution and included the required entity.
Exported the solution and tried to change the configuration.xml.
I have tried to make change under . But without any luck.
Can anyone help me out with an example.
Thanks in advance.
Don't edit it by hand. Use The Visual Ribbon Editor Tool. Makes things much nicer to deal with than hand editing the xml.
If you want to setup a button to be enabled if new_field1 (capitalization matters so make sure it's correct with what your field's actual name is) is not null, here is what you would do:
Open up the ribbon editor
Conenct to your org
Select your entity with the ribbon button you want to enable/disable
Click on your button
Click the Enable Rules tab
Enter the field name exactly as it appears in the customization section of your solution within CRM in the Field text box.
Enter "null" (without the quotes) for the value. Lower case.
Skip Default (if you have some custom forms where the field does not exist, you may want to give it a default value)
Change Invert Result to true.
Click the "Save" button at the very top. (don't click the save button on the main tab of the ribbon)
Verify that it is getting deployed and published.
Test it out.
Edit: Use Ribbon Workbench For System Ribbons
I've never used it, but the Ribbon Workbench says it can customize system buttons.

MFC Ribbon CEdit Textbox Allignment in Panel

I am trying to align two text boxes with two buttons in a panel, and I am unable to find anything about how to force positioning inside the MFC Ribbon Panels.
Here is a picture of what I have currently.
http://i.imgur.com/ofD0b.jpg (Sorry wont let me post images yet, have to link.)
The Change View Date box has the box associated with it sitting below it and the change system date box is up in the top right in the second "column" of controls. I would like to fix this so the Box with the spin controls sits next to the CHange View Date and the box without the controls sits next to Change System Date.
Thoughts? Thanks!
I think yow cannot do it.
What you can do is to put a Ribbon Separator after the Box with the spin controls and then set the property 'Center Column Vertically' on the Panel.
Hope it can help.

LWUIT: tabs - how to mark the currently selected tab

I have 4 tabs. Each tab is represented by a button. Those buttons are used to select the currently displayed tab. Each button has an icon and text.
I'd like to highlight the currently selected tab by changing background color and text label color of the corresponding button. I'd like to do it using Theme and Resource Editor.
I created theme and specified unselected, selected and pressed styles for UIID "Tab". My tabs look great in Sun WTK! Fine! But I found that on a real phone the tabs always look like unselected. I tried on Nokia 5800 XPressMusic and C7. Why the difference?
After some experiments I found out the reason - the buttons may be only in 2 states: unselected and pressed. They never be in the selected state. On the emulator when I move to a button using navi keys, it becomes selected.
So, what should I do to mark the current tab?
You can use a few different approaches especially in 1.5.
LWUIT 1.5 has a Tabs component which pretty much does everything for you and is remarkably flexible.
It uses radio buttons on which the method setToggleButton(true) is invoked. Toggle buttons act like radio buttons so when you press a button in the group it stays pressed and is rendered using the ToggleButton style (you can set the UIID to whatever you want). See a sample of using toggle buttons in the font demo portion of LWUIT demo.
An option that will work for older versions of LWUIT is to just set the UIID of the button to a different value when it is pressed (and restore the UIID of the previously selected button to the original value).
I implemented what I needed. Thanks to Shai and his example.
I didn't use theme properties and made all customizations in the code. I did so because I didn't catch how setting unique UIID can help me, since the problem is not in the identifying the UIID for which the props have to be changed, but in identifying the button's style to be changed.
Below some important notes of my solution.
Call addActionListener for the buttons AFTER they have added to the tabs.
When any tab button is pressed, update UNSELECTED styles of the tab buttons. Also you can change their icons.
Call form's repaint() after step 2.

Resources