I am tring to create an icon for menu in IC6. Problem is, when I import the png file the icon comes as too small. The icon I have is of 361 X 233 pixels. I am using hiLoadIconFile( "<filePath>.PNG" 48 8 ). But the size seems to have no change with respect to width & hight.
I read that hiLoadIconFile does not support any size of icons, only 16 X 16 pixels.
Is there some other trick to include a bigger logo in menu?
Also please let me know can the position of the menu be changed (eg: beginning, between File & Edit etc..) ?
I didn't try this with a bigger icon, but you can directly specify the icon as the path to the file rather than needing hiLoadIconFile.
I did not get that. How to directly specify the icon as the path to the file ? I can't use string for specifing file, it will take it as a menu name ! So how to do it ?
I was incorrect - some user interface functions which allow arguments allow the ?itemIcon to be specified as a file name (I've used them for buttons or toolbars for example), but if I do:
item=hiCreateMenuItem(?name 'cadence ?itemText "Cadence" ?itemIcon "/tmp/cadence_logo.png" ?callback "println(\"Cadence\")")hiCreatePulldownMenu('testMenu "Test" list(item))hiInsertBannerMenu(hiGetCIWindow() testMenu 10)*Error* length: argument must be a list or an array - "/tmp/cadence_logo.png"
Reading the documentation for ?itemIcon for hiCreateMenuItem it says:
List representing an icon menu item. The icon occupies the icon area on the left of the menu item, and the text (specified in t_menuItemText) is displayed alongside. Menu icons can only be 16x16 pixels in size. If the icon is larger than 16x16 pixels, it will be shrunk (which is why only 16x16 icons are recommended for the menu items). See Specifying Icons for hi Functions in Chapter 7 for information about how to specify an icon as an argument.
So you are limited to 16x16 icons for menu items.