Glyph Images in $inlinemenu

Author: i.sharp@pcisystems.co.uk (Iain Sharp)

I am trying to add glyph images to an existing $inlinemenu. I have tried adding IMAGE=^GLYPHNAME to the properties of the inline menu item. This appears to be ignored.  Does anyone know of any 'hidden' requirements for the glyph (Currently 15x16 >256 colours) or similar to make this work? 

9 Comments

  1. Hi Iain, IIRC, adding glyphs to menues uses some prefix in the option text separated by <gold>; ^glyphname<GOLD!>optiontext see

      1. For example: @..\images\file_open.png!Open file

    Defining and Using Menus


    Author: ulrich-merkel (ulrichmerkel@web.de)
  2. Yes, normal menus, however, trying that in inline menus causes the menu to fail to load/refresh.  The help text for $inlinemenu talks about the properties of the inline option, one of which is Image. 


    Author: Iain Sharp (i.sharp@pcisystems.co.uk)
  3. Sorry, Iain, you are 100% right that $inlinemenu has a totally different kind of logic.   The only other example (using glyphs) I found in u96_menu.zip It's under Uniface Samples: "GUI Sample: Menus " https://unifaceinfo.com/wp-content/uploads/2013/10/u96_menu_readme.html I just copied some lines out of the XML file   ;---------------------- ; Wild style ;---------------------- putitem/id pMenu, 1, "TYPE=OPTION&uSEP;TEXT=%%$text(DROPDOWN1)%%%&uSEP;IMAGE=^U8_CMPNEW" putitem/id pMenu, 2, "TYPE=OPTION&uSEP;TEXT=%%$text(DROPDOWN2)%%%&uSEP;IMAGE=^U8_APSOPEN" putitem/id pMenu, 3, "TYPE=OPTION&uSEP;TEXT=%%$text(DROPDOWN3)%%%&uSEP;IMAGE=^U_ACCEPT" putitem/id pMenu, 4, "TYPE=OPTION&uSEP;TEXT=%%$text(DROPDOWN4)%%%&uSEP;IMAGE=^U_STORE" putitem/id pMenu, 5, "TYPE=OPTION&uSEP;TEXT=%%$text(DROPDOWN5)%%%&uSEP;IMAGE=^U_REMOVE" putitem/id pMenu, 6, "TYPE=SEPARATOR" putitem/id pMenu, 7, "TYPE=OPTION&uSEP;TEXT=%%$text(DROPDOWN7)%%%&uSEP;IMAGE=^U_QUIT"


    Author: ulrich-merkel (ulrichmerkel@web.de)
  4. The download link should be: https://unifaceinfo.com/download/3813/


    Author: ulrich-merkel (ulrichmerkel@web.de)
  5. Hi Iain, Do you have the menu=umenu() setting in the [application] section of the .ini? I think by default in some releases it is commented out and then it doesn't display the icons.


    Author: eg (eugene.truter@sita.co.za)
  6. Hi Eugene, In 9606, I just had to change the  uniface\adm\usys.ini the modification of common\adm\usys.ini had no effect.

    ; Example of a menu definition ; menu=umenu(font=SansMedium;backcolor=#fdfdfd;forecolor=black;forecolorselect=blue;backcolorselect=#c0ddfc;bordercolorselect=#3399ff) menu=umenu(font=SansMedium;backcolor=#fdfdfd;forecolor=black;forecolorselect=blue;backcolorselect=#c0ddfc;bordercolorselect=#3399ff)

    The trigger code looked like

    ;PreDisplay trigger variables string strMenuItem, strMenuProperties endvariables ; ----------- Insert first menu item in a dynamic menu -------------- ;Initialize one menu item in list StrMenuItem = "" ;Define menu item "Option A" putitem/id strMenuItem, "TYPE", "Option" putitem/id strMenuItem, "TEXT", "Option A" putitem/id strMenuItem, "Checked", "True" ;Insert this item with id "A" into the dynamic menu. putitem/id $inlinemenu, "A", strMenuItem ; ----------- Insert second menu item in a dynamic menu ------------- ;Initialize one menu item in list. StrMenuItem = "" ;Define menu item "Option B" putitem/id strMenuItem, "TYPE", "Option" putitem/id strMenuItem, "TEXT", "Option B" putitem/id strMenuItem, "IMAGE", "^U8_ARCOK" ;Insert this item with id "B" into the dynamic menu. putitem/id $inlinemenu, "B", strMenuItem

    Thanks for the tip, Uli


    Author: ulrich-merkel (ulrichmerkel@web.de)
  7. Hmm, I use the /adm switch on startup, so it's the usys.ini  in the relevant folder that matters.  However, it appears that  

    menu=umenu() 

    isn't good enough,  if I use

    menu=umenu(backcolor=white;forecolor=black;backcolorselect=#0084CC;forecolorselect=white;backcolorfill=flat)

    the images show up, now what I have to do is work out what to set to get the rest of the behaviour to be the same as it was before (i.e. system colours etc.) Seems there is a hidden trick after all. The umenu has to be other than default before the images will show.  Weird.  Iain


    Author: Iain Sharp (i.sharp@pcisystems.co.uk)
  8. Seems that, forecolor=black;backcolorfill=flat is a reasonable approximation, I could play about with the backcolorselect to get the exact colour match, but at least I've got the pictures working, and can talk to sales about what they want the menus to look like.  Makes my top menu more spaced out though, I'm worried that the system menu won't fit on a default screen size any more.  I've got the choice to play with though. 


    Author: Iain Sharp (i.sharp@pcisystems.co.uk)
  9. Hi Iain, You can try the following names: COLOR_ACTIVEBORDER COLOR_ACTIVECAPTION COLOR_APPWORKSPACE COLOR_BACKGROUND COLOR_BTNFACE COLOR_BTNHIGHLIGHT COLOR_BTNSHADOW COLOR_BTNTEXT COLOR_CAPTIONTEXT COLOR_GRAYTEXT COLOR_HIGHLIGHT COLOR_HIGHLIGHTTEXT COLOR_INACTIVEBORDER COLOR_INACTIVECAPTION COLOR_INACTIVECAPTIONTEXT COLOR_INFOBK COLOR_INFOTEXT COLOR_MENU COLOR_MENUTEXT COLOR_SCROLLBAR COLOR_3DDKSHADOW COLOR_3DFACE COLOR_3DHILIGHT COLOR_3DLIGHT COLOR_3DSHADOW COLOR_WINDOW COLOR_WINDOWFRAME COLOR_WINDOWTEXT COLOR_HOTLIGHT COLOR_GRADIENTACTIVECAPTION COLOR_GRADIENTINACTIVECAPTION COLOR_MENUHILIGHT COLOR_MENUBAR


    Author: eg (eugene.truter@sita.co.za)