GUIKIT PACKAGE TUTORIAL

Layout Samples

It is perhaps easiest to see when to use certain layout elements by visually illustrating how they each combine to create a resizable dialog. Here are a number of further examples that combine some of the previous layout features and common interface layout design patterns.

Tabbed Pane Samples

Here is an example that generates content within a set of tabbed panes.

In[6]:=
Click for copyable input
Out[6]=
In[7]:=
Click for copyable input
Out[7]=

Each element of the tabbed WidgetGroup can be a list of widgets to populate one tab panel or a single widget whose contents will be placed within one pane.

In[8]:=
Click for copyable input
Out[8]=
In[9]:=
Click for copyable input

Split Pane Samples

Here is an example that uses a split pane and shows how you can optionally name the split pane so it can be manipulated using its properties at runtime.

In[6]:=
Click for copyable input
Out[6]=
In[7]:=
Click for copyable input
Out[7]=
In[8]:=
Click for copyable input
Out[8]=

If you resize the panel a little larger, you can see that you can programmatically move the divider position.

In[9]:=
Click for copyable input
In[10]:=
Click for copyable input
Out[10]=

You can also use a method with percentage value instead of using the integer property value.

In[11]:=
Click for copyable input

Layout Sample 1

In[12]:=
Click for copyable input
Out[12]=
In[13]:=
Click for copyable input
Out[13]=

After resizing:

In[14]:=
Click for copyable input
Out[14]=

Layout Sample 2

In[15]:=
Click for copyable input
Out[15]=
In[16]:=
Click for copyable input
Out[16]=

After resizing:

In[18]:=
Click for copyable input
Out[18]=

Layout Sample 3

In[19]:=
Click for copyable input
Out[19]=
In[20]:=
Click for copyable input
Out[20]=

After resizing:

In[21]:=
Click for copyable input
Out[21]=

Layout Sample 4

In[22]:=
Click for copyable input
Out[22]=
In[23]:=
Click for copyable input
Out[23]=

After resizing:

In[24]:=
Click for copyable input
Out[24]=

Layout Sample 5

In[25]:=
Click for copyable input
Out[25]=
In[26]:=
Click for copyable input
Out[26]=

After resizing:

In[27]:=
Click for copyable input
Out[27]=
New to Mathematica? Find your learning path »
Have a question? Ask support »