Skip to content
This repository has been archived by the owner on Jul 7, 2022. It is now read-only.

How to set columns width GUI V1

Blair2004 edited this page Nov 20, 2014 · 9 revisions

Have you read : firsts steps on GUI ?

First step to UI is defining how many columns are available. GUI-V1 support up to 4 columns with 4, as maximum width.

As you may understand, 1 width take 25% of content space. 2 width takes 50% and so on.

You can set different width for each columns. But if all width 3 times exceed 12, some columns will overflow.

Be carefull with.

To define a columns width, use GUI "cols_width" method this way :

$this->gui->cols_width( 1 , 2 ); 
$this->gui->cols_width( 2 , 2 );

// Create two columns with same width or

$this->gui->cols_width( 1 , 1 ); 
$this->gui->cols_width( 2 , 1 ); 
$this->gui->cols_width( 3 , 2 );

// Create 3 columns

or

$this->gui->cols_width( 1 , 3 ); 
$this->gui->cols_width( 2 , 1 );

Next : How to add meta box to a column