Table of Contents | ||||||||
|
||||||||
ShowCaption | ||||||||
Purpose Shows or hides a button's caption text |
||||||||
Protoype void CButtonMngr::ShowCaption (bool b_visible, string str_button, exclude ex_list = exclude(), int i_flag = LIST_IN) |
||||||||
Parameters
|
||||||||
Description This function controls the visibility of captions on a button. like icons, captions can be made visible or hidden for various purposes. If you want to show a button's caption, you pass in the ID of the button for str_button along with TRUE for b_visible. If you want to hide the caption then you would pass FALSE for b_visible instead. Affecting Multiple Objects If you want to affect more than one button object at once, then you can use the last two parameters of the function. First you must compile a list (an STL vector) of objects that you want to either exclude or include. If you want to affect all button objects except certain ones, pass those in for ex_list along with the flag LIST_IN. If you want to affect only a certain set of objects, pass those in for ex_list along with the flag LIST_OUT. You should also pass ALL_BUTTONS for str_button. |
||||||||
Use CButtonMngr button; // show one caption button.ShowCaption(true, "my_button"); // hide ALL captions except "my_button" exclude ex_list; ex_list.push_back("my_button"); button.ShowCaption(false, ALL_BUTTONS, ex_list, LIST_IN); // show ONLY these three captions exclude ex_list; ex_list.push_back("my_button1"); ex_list.push_back("my_button2"); ex_list.push_back("my_button3"); button.ShowCaption(true, ALL_BUTTONS, ex_list, LIST_OUT); |
||||||||
|
||||||||
|