Discussion:
Separator in Windows popupmenu
Jean-Luc Arnaud
2016-11-21 11:19:50 UTC
Permalink
Windows and Linux do not support separators within PopupMenus, so this
(popupmenu.AddSeparator) simply adds a row with the text "-" that can
be selectable by the user.
How may I deal with these "-" menus I don't want selectable by user?

If no way in Xojo it-self, is there a free class, or maybe a solution in
MBS plugins?

TIA for any help.
--
Jean-Luc Arnaud


_______________________________________________
Unsubscribe by sending a message to:
<nug-***@lists.xojo.com>

List Help: <***@xojo.com>
Jean-Luc Arnaud
2016-11-21 13:32:56 UTC
Permalink
Replying to myself, I tested this code in the Change event of the
popupmenu. It works but "-" line is still selectable.

// LastIndex is a global property of the main window.

If Me.Text="-" Then
Me.ListIndex=LastIndex
Else
LastIndex=Me.ListIndex
End If


Other ideas?

TIA

Jean-Luc Arnaud
Post by Jean-Luc Arnaud
Windows and Linux do not support separators within PopupMenus, so
this (popupmenu.AddSeparator) simply adds a row with the text "-"
that can be selectable by the user.
How may I deal with these "-" menus I don't want selectable by user?
If no way in Xojo it-self, is there a free class, or maybe a solution
in MBS plugins?
TIA for any help.
_______________________________________________
Unsubscribe by sending a message to:
<nug-le
vaughnsc .
2016-11-21 14:22:31 UTC
Permalink
how about:

if targetMac then popupmene.addSeparator

(dont use them where they dont work)

Vaughn
Post by Jean-Luc Arnaud
Replying to myself, I tested this code in the Change event of the
popupmenu. It works but "-" line is still selectable.
// LastIndex is a global property of the main window.
If Me.Text="-" Then
Me.ListIndex=LastIndex
Else
LastIndex=Me.ListIndex
End If
Other ideas?
TIA
Jean-Luc Arnaud
Windows and Linux do not support separators within PopupMenus, so this
(popupmenu.AddSeparator) simply adds a row with the text "-" that can be
selectable by the user.
How may I deal with these "-" menus I don't want selectable by user?
If no way in Xojo it-self, is there a free class, or maybe a solution in
MBS plugins?
TIA for any help.
_______________________________________________
_______________________________________________
Unsubscribe by sending a message to:
<nug-***@lists.xojo.com>

List H
Jean-Luc Arnaud
2016-11-21 15:14:28 UTC
Permalink
Thanks for replying, Vaughn.

Yes, of course, on Mac, no problem.

But I would like, on Windows too, to separate items into groups with
separators.

Jean-Luc Arnaud
Post by vaughnsc .
if targetMac then popupmene.addSeparator
(dont use them where they dont work)
Vaughn
Post by Jean-Luc Arnaud
Replying to myself, I tested this code in the Change event of the
popupmenu. It works but "-" line is still selectable.
// LastIndex is a global property of the main window.
If Me.Text="-" Then
Me.ListIndex=LastIndex
Else
LastIndex=Me.ListIndex
End If
Other ideas?
TIA
Jean-Luc Arnaud
Windows and Linux do not support separators within PopupMenus, so this
(popupmenu.AddSeparator) simply adds a row with the text "-" that can be
selectable by the user.
How may I deal with these "-" menus I don't want selectable by user?
If no way in Xojo it-self, is there a free class, or maybe a solution in
MBS plugins?
TIA for any help.
_______________________________________________
_______________________________________________
_______________________________________________
Unsubscribe by sending a message to:
<nug-leav
Marnaud
2016-11-21 17:31:59 UTC
Permalink
Post by Jean-Luc Arnaud
Yes, of course, on Mac, no problem.
But I would like, on Windows too, to separate items into groups with separators.
You may use a contextual menu instead. I don’t specifically recall whether they allow separators on Windows (menus on menu bars do, for instance), but even if not, you can at least have disabled items (so you may have blank or “grouping” menu item (like “Others:”), not selectable by the user; the only missing thing in that case would be the line).
_______________________________________________
Unsubscribe by sending a message to:
<nug-***@lists.xojo.com>

List Help: <***@xojo.com>
Jean-Luc Arnaud
2016-11-22 12:47:03 UTC
Permalink
Thanks for the suggestion, Arnaud.

Jean-Luc Arnaud
Post by Marnaud
Post by Jean-Luc Arnaud
Yes, of course, on Mac, no problem.
But I would like, on Windows too, to separate items into groups with separators.
You may use a contextual menu instead. I don’t specifically recall whether they allow separators on Windows (menus on menu bars do, for instance), but even if not, you can at least have disabled items (so you may have blank or “grouping” menu item (like “Others:”), not selectable by the user; the only missing thing in that case would be the line).
_______________________________________________
_______________________________________________
Unsubscribe by sending a message to:
<nug-***@lists.xojo.com>

List Help: <***@xojo.com>

Loading...