Home > Community > Forums > Custom IC SKILL > create icon in menu in IC6

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 create icon in menu in IC6 

Last post Fri, Apr 5 2013 11:20 PM by Andrew Beckett. 3 replies.
Started by Aritra 06 Mar 2013 01:10 AM. Topic has 3 replies and 960 views
Page 1 of 1 (4 items)
Sort Posts:
  • Wed, Mar 6 2013 1:10 AM

    • Aritra
    • Top 200 Contributor
    • Joined on Thu, Apr 22 2010
    • Howrah, West Bengal
    • Posts 42
    • Points 775
    create icon in menu in IC6 Reply

    Hi,

     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..) ?

    Please help. 

     

    Filed under:
    • Post Points: 20
  • Sun, Mar 24 2013 4:35 AM

    Re: create icon in menu in IC6 Reply

    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.

    Andrew.

    • Post Points: 20
  • Mon, Apr 1 2013 10:09 PM

    • Aritra
    • Top 200 Contributor
    • Joined on Thu, Apr 22 2010
    • Howrah, West Bengal
    • Posts 42
    • Points 775
    Re: create icon in menu in IC6 Reply

    Sorry Andrew,

     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 ?

    • Post Points: 20
  • Fri, Apr 5 2013 11:20 PM

    Re: create icon in menu in IC6 Reply

    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.

    Regards,

    Andrew.

    • Post Points: 5
Page 1 of 1 (4 items)
Sort Posts:
Started by Aritra at 06 Mar 2013 01:10 AM. Topic has 3 replies.