SmartGWT ComboBoxItem - item in Combo is not marked in the pick list - smartgwt

I'm using ComboBoxItem(com.smartgwt.client.widgets.form.fields.ComboBoxItem). My question is how to force it to mark, hilight selected value in a pick list?
It is demonstrated in the SmartGWT showcase, Combo with a Label "A simple ComboBoxItem" http://www.smartclient.com/smartgwt/showcase/#styled_combobox_category.
'Mouse' item is in the combo, however in the pick list 'Cat' item is selected - not as I would expect - a 'Mouse'.
Thanks in advance,
emph

You can't. ComboBoxItem's PickList object (the drop down list), always moves its cursor (the selection marker) at the top of the list, or the first element that will be selected based on the user's input. If you want the cursor to show the selected value, use the SelectedItem instead, in the same way you use the ComboBoxItem. One drawback with this, is the fact that you can't type and have the auto-complete effect. However, if you type after you open the PickList for the SelectItem, the cursor will move to a matching option.

Related

tooltip for checkboxGroup or radioGroup in repeat control

I have a repeat control bound to a (multi column) viewScope array.
The idea is that the chekboxGroup value will come from the first column and that the tooltip will come from the second column from the array.
The first thing (checkbox value) is not the problem. (see code)
The second thing is:
How can I assign the correct tooltip to the correct checkbox ?
<xp:repeat id="repeat4" rows="100" value="#{viewScope.choices}"
indexVar="rownumber" var="row" first="0">
<xp:checkBoxGroup id="checkBoxGroup2" layout="lineDirection">
<xp:selectItems>
<xp:this.value><![CDATA[#{javascript:return viewScope.choices[rownumber].get(0)}]]></xp:this.value>
</xp:selectItems>
</xp:checkBoxGroup>
<xe:tooltip id="tooltip1" for="checkBoxGroup2">
<xe:this.label><![CDATA[#{javascript:return viewScope.choices[rownumber].get(1)}]]></xe:this.label>
</xe:tooltip>
</xp:repeat>
EDIT
It seems that the tooltips work but are displayed off screen.
How do I manage to display them at the correct spot ?
Add position="before" or position="above" or position="below" to your tooltip control.
<xe:tooltip id="tooltip1" for="checkBoxGroup2" position="before">
By default it is "after" and this is outside the visible area in your example.

TComboBox.AutoCloseUp Property: What does it do?

From the documentations:
Specifies whether the drop-down closes up automatically when the user
selects an item.
I have played with this property (combined with AutoComplete and AutoDropDown) and I just can't seem to figure out the UI behavior of this property.
Setting it to True or False I can't see any difference in how it behaves.
Can anyone explain to me what it does exactly?
You will see the difference if you have AutoCloseUp = True and also AutoDropDown = True. For example, if you have items '0', '1' and '2' and the ComoBox has focus, when you use the keyboard and press 2 the dropdown list flashes briefly and is closed again with item '2' selected. If you change AutoCloseUp = False, then the dropdownlist remains open (and you can change your selection with the arrow keys) until you indicate your selection with Enter
If you operate the combo only with your mouse, then there's no difference.
Addition after comments
If you add to my example items '22' and 'more' and you also have AutoComplete = True (which it is by default) you will note the following:
item '22' is not selectable with two consecutive hits on 2. It is of course still selectable with the arrow keys, like all other items.
The AutoCloseUp feature closes the dropdown when AutoComplete finds a matching item for all sofar typed keys. If you type m, o, r the list is still open, 'more' selected and the list is finally closed if you type the missing e.

Excel 2010, how to keyboard shortcut to filter dropdown checkboxes?

For Excel 2010, when I have the filter drop-down open
...how do I get to the filter checkbox section via keyboard shortcut? Skipping everything from "Sort A to Z" to the "Search" box, going all the way to the checkboxes.
Quickest Option: e ↓
In Excel 2010 (English) you just have to press e to get to the filter textbox; from there you can use the down arrow key ↓ to go to the first checkbox:
Alternative Option
Shift+Tab
Shift+Tab
Shift+Tab
(as mentioned by #Sean_Cheshire) - this goes "backwards" from the first entry over "Cancel" and "OK" to the first (sic!) checkbox.
Related Question: How to open the filter drop-down
The question above is about how to move inside the filter drop-down. To open the filter drop-down, you have one or two options:
For any filter: As #Juhi and #Josh have pointed out, you can open said menu with the keyboard when the column heading cell (where you would click to open the drop-down) is selected by typing Alt+ ↓ .
For tables: If you are using a Table object instead of a pivot table or regular filtered range, you can be in any row of the Table and open the filter drop-down using Alt+Shift+ ↓
ALT+DOWN arrow key opens the selection box. Use the arrow keys to select an option and SPACEBAR to "check" or "uncheck."
Try ALT+down. It opens the drop down list in filters and cells as well.

How do I move multiple nodes at once in a TJvTreeView?

When you select multiple nodes of a JvTreeView, and then try to drag these nodes, the JvTreeView selects the node you clicked to drag, rather than initiating dragging all the selected nodes. You end up dragging only this single node.
Is it possible to drag multiple nodes in a JvTreeView? I am using Delphi 2007.
UPDATE: Oddly enough, if I hold down CTRL+SHIFT when dragging the items, I can successfully drag them all. Any ideas?
Suppose MultiSelectStyle is the default [msControlSelect], then the answer to your question is 'you don't release the control key when you're selecting the last item and beginning dragging'.
The culprit is in TJvTreeView.WMLButtonDown in JvComCtrls.pas. Code there tests if 'Ctrl' is pressed when the TreeView is MultiSelect, and clears all items and selects the clicked item if 'Ctrl' is not pressed. It should instead test if the clicked item is already selected and do nothing if it is.
You can see the broken behavior without dragging. Multi select a few items and then click a selected item with the mouse. The VCL TreeView do not select or de-select anything, while the JVTreeView, instead, de-selects all items and selects the clicked one.
Yes absolutely, I do it all the time.
Of course Multi-Select needs to be True and you may need to have a look at the TTreeView's MultiSelectStyle. That controls what type of nodes can be selected at the same time. For example if msSiblingOnly is set to true, you can only select sibblings.
Are you using dmAutomatic or dmManual. If the latter, it could be that you are doing something in the OnMouse* events that is negating the multi-selection you made earlier.

List box values on postback

I am using asp.net mvc. I have used two list box in one of my views.
I transfer desired items from left-hand-side list box to right-side list box.
On a button click, i want to get the list box contents from right side list box.
I don;t get in form collection. Can anyone please suggest how can I get it?
thanks,
kapil
The only values in the list box that are selected will appear in the form collection.
When you transfer to the second list box, I would add a hidden field and add the cvalues into there (with some delimiter between). Upon POST you could split the string value of this hidden value to find contents of right hand list box.
Alternatively, just prior to Submit (intercept with JavaScript), set all values in right hand list box to selected.

Resources