Toggle a custom icon on an Action Button on Lotus Notes form - lotus-notes

When editing the action button properties, it allows an #if statement to flip/flop two choices (lock/unlock). i.e. #If(enlock=1;"Unlock";"Lock") for the "Label" of the action button.
At the bottom of the Action properties, icons can be None, Notes, or Custom. When I select Custom, I want the #if to use either the Locked/Unlocked Notes icons. (actn084.gif and actn085.gif, respectively) Or numbers #62 (locked) and #(I don't know/can't find, the # for the unlock icon).
I've tried formula with the icon number, like in a view, "display as icons" for view column. Using an #if, I've tried the gif on local and server replica's and it didn't give any results.
Please see the example image below.
Image example: http://i.stack.imgur.com/UBac3.png

You have to add actn084.gif and actn085.gif to Resources/Images.
Then, you can use a formula
#If(enlock=1;"actn085.gif";"actn084.gif")
for calculating icon.
As an alternative, you could create two buttons and hide-when them depending on field enlock. You could assign label and icon direct to buttons without formula then.
The hide formula would be enlock=1 for first button and enlock!=1 for the second. In both buttons you would have to add #Command([RefreshHideFormulas]); at the end of your action formula to refresh the action buttons (or Call uiDoc.RefreshHideFormulas for LotusScript action code).

Related

Keyboard accessibility ( WCAG) in panels with list of elements that has assigned button role

Hi :) I would like to ask you about how to treat elements that compose a list, but whom have assiged a button role and are put in side panel ( so it is not a menu or dropdown). My main problem is how to decide is to where ARROWS should works and where TAB.
Moreover I have a differ types of list items that consist of:
checkbox/ radiobutton only
checkbox/ radiobutton with a link to another panel
two icons/ buttons that has defined an activities etc.
Please look at pictures and help me please :)
PINK - "arrows"
BLUE - "TAB"key
You should hardly decide which component will use TAB key or Arrow Keys. Keyboard accessibility for a large number of components is already defined in WAI-ARIA Authoring Practices.
Adding a different behavior could create issues to both sighted, and non-sighted users because they'll already be knowing which key to use based on the component or they'll know intuitively because of standard roles or they'll know as they use keyboard more to browse.
Offer List
Listbox will work. Arrow Keys to navigate and Enter key to perform the action.
List of Checkboxes and Radio Buttons
I would recommend to keep Checkboxes and Radio Buttons to their default keyboard behavior. Since your cases are more of a list, you can convert the list of checkboxes and radio buttons to Single Select and Multi Select Listboxes and use Checkbox and Radio Button as a font icon or graphic to show the selection, similar to how tick is shown in this Listbox example. When you convert to a Listbox, you'll meet the Arrow Keys requirement.
Selected Fruits List
There are some issues in the required keyboard behavior: How will user know if Arrow-Left or Arrow-Right need to be presed, think about non-sighted users.
Fruit Name and i icon button
In your need, you want both Fruit Name and i icon button to open a panel, suggest to NOT use Arrow-Right to i icon button and only use the Enter key to open the panel. May be you don't need i icon button at all.
Delete icon button
Suggest to use DEL key to delete the item
Conclusion
Remove i icon button. If you can't just keep it as graphic element without any events
Use Enter key to open the panel
Use DEL key to delete the item
I think the whole list will then become a listbox, navigable using Arrow Keys and Enter to invoke an operation
Vegetables List
Neither Accordion nor Nested List works here because you have two actions to do: Make a selection, and Expand and Collapse. I haven't tried TreeView but you can check.

Excel VBA hide the form control buttons

I have created an "Expandable/Collapsible" structure using VBA. I have added some form controls, like a dropdown or option buttons in each of the section, but the issue is that, when the whole thing is collapsed, the form controls are visible in the button. please check the screenshot and advise a solution.
Yes that is because you have not selected Move and Size with cells.
That option is greyed out when you right click on the control and then click on Format Controls | Properties | Move and Size with cells for Option Button and Combo Box as shown below.
You need to use a different way to activate it.
Click the control and then click as shown below
And then from there you can set those properties.
Now those controls will hide when you collapse the rows.

Partial refresh after OK in name picker control

how can I establish a partial refresh after I select the OK button in the xe:namePicker control ?
I only have the for property which does copy the selected value in the assigned field.
The onchange event for that field does not always seem to recognize the value change.
Instead of an Edit Box, I would recommend using Dojo Name Text Box, as covered here. It avoids the need for validation - with an Edit Box even though you provide a Name Picker, users can still enter values manually and can edit them after selecting from the name Picker. The Dojo Name Text Box and Dojo List Text Box are the only controls I use with pickers and almost always use onChange with them, without issue.
One caveat is that the Events tab defaults to onClick. On more than one occasion I've coded onClick instead of onChange, but it's easily identifiable and rectifiable.

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.

How to modify EditField value on CheckBox action in InstallShield

I have EditField (it has global property EDITPROP) on the same window I have checkBox. I want to midify text that is visible in EditField when I check CheckBox.
I create action that modifies this property (EDITPROP) and run it on CheckBox click (as and DoAction). But when I click on CheckBox, I cannot see any changes in text on EditField.
What should I do in order to show this updated text on the EditField ?
It's an MSI limitation that while EDITPROP will have the selected value as defined in the CheckBox table, and UI elements using it ( [EDITPRO] ) won't refresh until you call NewDialog to go to the next dialog. A work around for this behavior is to use ControlConditions to show/hide two mutually exclusive Text controls that use static text to represent the selected and unselected state.

Resources