ContextualMenu WebListBox MultiLine

Hello,

I have a WebListBox in which the user selects more then one line.

When the user right-clicks on the list to see the ContextualMenu, all selected lines except for one line are deselected.

Is there a workaround for this behavior?

Bump

[quote=170911:@Dan Berghult]Hello,

I have a WebListBox in which the user selects more then one line.

When the user right-clicks on the list to see the ContextualMenu, all selected lines except for one line are deselected.

Is there a workaround for this behavior?[/quote]

Sub MouseDown(X As Integer, Y As Integer, Details As REALbasic.MouseEvent) for i as integer = 0 to me.rowcount-1 me.RowTag(i) = me.selected(i) next End Sub

Sub ContextualMenuAction(Item As WebMenuItem) for i as integer = 0 to me.rowcount-1 me.selected(i) = me.RowTag(i) next End Sub

Clever - but I would like to avoid that the selected lines are deselected when the contextual menu is presented.

In you solution it seems as the rows are deselected when the menu pops up and then after the selection in the popupmeny is done, the rows are selected again.

[quote=171813:@Dan Berghult]Clever - but I would like to avoid that the selected lines are deselected when the contextual menu is presented.

In you solution it seems as the rows are deselected when the menu pops up and then after the selection in the popupmeny is done, the rows are selected again.[/quote]

You bumped, I tried to bring some kind of solution. As far as I know, there is nothing in WE analogous to Return True in MouseDown that would permit to inhibit the normal behavior of the WebListBox which is to select the row under the click.

The only other way I see is to use WebSDK to create a custom control based on WebListBox which would catch Right click and prevent the change in selection. But that goes way beyond a simple post. You will have to work on that yourself.

I’m sorry if I came thru as unappreciating - I’m not.

Thanks again!

This is a problem im interested in too…

And the Listbox doesnt have a .rowcount i think

[quote=182332:@Sascha Mierke]This is a problem im interested in too…

And the Listbox doesnt have a .rowcount i think[/quote]

It is there : http://documentation.xojo.com/index.php/WebListBox

Ah i see a weblist box … meh im at desktop ;D

[quote=182332:@Sascha Mierke]This is a problem im interested in too…

And the Listbox doesnt have a .rowcount i think[/quote]
It’s called ListCount on desktop.