I want to draw a GoContextMenu like this:
Show icon before the text.
how can i do this?
thanks…
GoContextMenu is just a ContextMenu
Each item is a MenuItem wich by default shows only text. If you want to show an image (or anything else) you have to handle the DrawItem event (example here http://msdn.microsoft.com/en-us/library/system.windows.forms.menuitem.drawitem%28v=vs.110%29.aspx) and set the OwnerDraw propery to true.
[QUOTE=georgekal]
GoContextMenu is just a ContextMenu
Each item is a MenuItem wich by default shows only text. If you want to show an image (or anything else) you have to handle the DrawItem event (example here http://msdn.microsoft.com/en-us/library/system.windows.forms.menuitem.drawitem%28v=vs.110%29.aspx) and set the OwnerDraw propery to true.
[/quote]
My program is webform,not winform.
is it the same with winform?
Sorry my friend, I have no idea how the webform work , you could try and tell us
The menu is built in function goBuildMenu in goWeb.js. It doesn’t support icons.
I suppose you could modify goWeb.js to add it, but it’s not something on our to-do list.
Thanks very much. I’ll try to modify GoWeb.js to <span ="" id=“w_30”><span id=“w_31” =“high-light”>achieve <span id=“w_32” =“high-light”>it.