PopupMenu.AddSeparator Behavior

I’m using Xojo R2014R2 on Mac OSX. I can use .AddSeparator to add a separator item to a PopupMenu, but it doesn’t show as a line, and it can be selected by the user. I’d like it to behave the same way a pulldown menu works with .AddSeparator.

Is there any way to work around this?

[quote=113417:@John McKernon]I’m using Xojo R2014R2 on Mac OSX. I can use .AddSeparator to add a separator item to a PopupMenu, but it doesn’t show as a line, and it can be selected by the user. I’d like it to behave the same way a pulldown menu works with .AddSeparator.

Is there any way to work around this?[/quote]

I just tried the example from the LR at http://documentation.xojo.com/index.php/PopupMenu.AddSeparator and modified it a bit, then used it in the open event

me.addRow "Zaza Gabor" dim s(2) as string s(0)="Abbott" s(1)="Costello" s(2)="Frankenstein" me.AddSeparator me.AddRows s

The separator is a line, and cannot be selected…

You’re right! So I searched through all my code, found nothing that looked suspicious. I made an example project similar to yours and it worked flawlessly. I put the popup menu on top of a page panel in the example project (just like in my original app), it worked flawlessly. I eyeballed my own code and ran it over and over, no luck.

Then I went to dinner. When I came back, I saw immediately that I wasn’t actually adding a separator, I was adding a blank line. It was a stupid typing mistake!

So the problem was between the keyboard and the chair…:frowning:

Thanks!

PEBKAC - problem exists between keyboard and chair