Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

"Checked" toolbar button

RomanKhvostikov

New member
Hi!


I have my own "check" menu item in main menu. It is done by ProCmdOptionAdd() + ProMenubarmenuChkbuttonAdd(). Then I put it on my own toolbar. It works fine - it has enabled/disables states.


But it doesn't have "checked" (or "pressed") state. I quess that's because uiCmdAccessState enum doesn't have corresponding value.


Is there any way make my toolbar button have checked state?
Edited by: RomanKhvostikov
 
Roman,


Look up the function ProMenubarmenuChkbuttonValueSet(). However; to set the initial value of the checkbutton you need to specify the set_value_cb callback function in the ProCmdOptionAdd() function. Within the set_value_cb callback function you need to return a 0 or 1 which will set the value of the check.
 
Weel, I checked it


the thing is that set_value_cb callback function is not called for toolbar button to update its state, only for menu item :(
 

Sponsor

Back
Top