开发者

glui setting button width

I have a problem with glui code, which is as follows:

glui=GLUI_Master.create_glui_subwindow(main_window,GLUI_SUBWINDOW_TOP);
b1 = glui->add_button("Navigator",0,cal);
b1->GLUI_Control::set_w(10);

glui1->add_column(false);
b2=glui1->add_button("Query",1,cal);
b2->set_w(50);
glui1->add_column(false);
b3=glui1->add_button("OLAPTable",2,cal); 
b3->set_w(50);

My program is working nicely; but now I want to change the width of the buttons. To do this I'm using the set_w function GLUI_Control::set_w();. These functions are not working (the size of button remains the same).

What should I do to change the size of a button in a glui window开发者_如何学Go or sub-window?

Why is set_w() not working?


You can't set the size of button smaller than than than its content i.e. the name you have given to the button. Try to increase the size of the button from its current size, it will increase but will not decrease. May be decreasing font size can help you but I'm not sure about that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜