VxAlignedForm


Create vertically aligned widget(s) in a Form

Syntax

VxAlignedForm object_name dataList

Description

Creates one or more vertically aligned widgets within a Form, with right-justified Labels. Returns the widget name.

Parameters

object_name
The widget hierarchy of the Form.

dataList
A list of lists, each containing a Label and another list containing the desired widget creation command with any desired arguments.

Notes

Each Label and widget are each contained within separate Forms. Their widget names may be retrieved as follows:

Form
VxGetVar $name "form$n"

Widget
VxGetVar $name "widget$n"

Label
VxGetVar $name "label$n"

Where $name is the name returned by the VxAlignedForm call, and $n is the position of the widget. The first widget is number 1.

Example

The following code produces an AlignedForm containing a number of Label and Text widgets.

set app [VtOpen "VxAlignedForm"]
set dlog [VtFormDialog $app.Dialog -title "VxAlignedForm Demo"]
set form [VxAlignedForm $dlog.Align\
  { {"Fruit:"         {VtText -columns 15 -value "Kumquat"}}
    {"Price:"      {VtText -value "2 Dollars"}}
    {"Availability:" {VtText -value "Only in season"}}}]
VtShow $dlog
VtMainLoop

This code produces a Form like this: