cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

How to assign icon to the menu(push button) created by protoolkit. I am able to assigh it tp casecade button but not for push button

mwaghmode
1-Newbie

How to assign icon to the menu(push button) created by protoolkit. I am able to assigh it tp casecade button but not for push button

Hi ,

I have created custom menu push buttons in creo3. how can i assign icon to the push button. I am able to assign it to cascade menu but not to push button.

Thanks in Advance,

Manoj


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
1 ACCEPTED SOLUTION

Accepted Solutions

Thanks a lot Eike for you Quick response.

I will check it out.

//BR

Manoj

View solution in original post

2 REPLIES 2

Hi in ProToolkit it should work like this :

create the PushButton

Toolkit

uiCmdCmdId pro_cmdId = NULL;

ProMenubarmenuPushbuttonAdd("MDLPRCMenubarMenu", "pbVisitParameters", "MPU StartModelProcessorBtn", "MPU StartModelProcessorHlp", NULL, PRO_B_TRUE, pro_cmdId, g_translation_file);

ProCmdDesignate(pro_cmdId, "MPU StartModelProcessorBtn", "MPU StartModelProcessorHlp", "MPU StartModelProcessorDesc", g_translation_file);

ProCmdIconSet(pro_cmdId,"modproc.gif");

All lines return a ProError often this one shows you where the failure is.

Don't forget to put the image you want to set to your ressources. Creo only look inside the resources for pictures at :

<application_text_directory>/<language>/resource/

You should lay there 2 Images.

- First one is 16x16 and have naming convention name.png.

- Second one is 32x32 and have naming convention name_large.png

Creo selects automaticly the right size for display inside of Menu's.

alternativ in OTK

Objekt Toolkit

pfcUICommand_ptr cram_start_cmd = wSession->UICreateCommand("CRA_MATERIAL", new MycallbackClass(cram::cram_start));

cram_start_cmd->Designate ("cram_message.txt", "CRA Material selection", "CRA Material selection", "CRA Material selection");

cram_start_cmd->SetIcon("cram_icon.png");

Best regards,

Eike

Thanks a lot Eike for you Quick response.

I will check it out.

//BR

Manoj

Top Tags