Contextual Menu when listbox row = -1

I have a weblistbox that when I right click to be prompted with the contextual menu, I get the menu on rows that are not populated with data? Suggestions on how to disable the menu when the row is not populated.

Thanks!

add in code to only enabled the contextual menu only if the listbox row <> -1

Where is that done? I have tried MouseDown and Open.

sorry… just notice you are asking about weblistbox!!
i know i can do that on the listbox on desktop

[quote=442538:@Richard Duke]sorry… just notice you are asking about weblistbox!!
i know i can do that on the listbox on desktop[/quote]
They’re not the same.

Knowing they are not the same, any advice on how to accomplish what I am trying to do? Disable contextual menu on right click of weblistbox when the selected row of the listbox does not contain data?

i know… just wish the weblistbox is as powerful as the listbox in desktop one

GraffitiSuite has a contextual menu that works in web.

Thanks @Richard Duke and @dave duke for the replies.

I am working on a Proof of Concept for my company in order for them to “buy in” to using Xojo for a collection of internal projects. I hate to sound like “that guy” but this is why I stopped trying to sell it to employers two years ago. Answers like,

[quote]@Greg O’Lone They’re not the same.[/quote] rather than direction on how to do it if it can be done without purchasing add-ons.

If anyone else has this issue and can provide insight on how to resolve, workaround, etc., I would like to finish my POC. I am done minus this one issue and was planning to present this next Wednesday.

Thanks.

Ok, so you might be able to accomplish this by setting the value to Nil if there is no selection, having it not show at the instant that the user clicks based on what they do or do not click on is a little trickier. The problem lies in the fact that mouse events require a round trip to the server to execute any logic you’ve coded in Xojo.

That said, you might be able to hack something in JavaScript to do this. I just haven’t been near a computer to try anything out.

I also encourage you to file a feature request in Feedback for this. It’s certainly something we could/should support in the new web framework.