glui setting button width

816 views Asked by At

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 or sub-window?

Why is set_w() not working?

1

There are 1 answers

1
Shweta On BEST ANSWER

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.