Default value: center for Button, otherwise left
center for Button, otherwise left
Aligns the text in the control accordingly.
Applies to: Button, Label, RichEdit, Textfield
Default value: 0
0
Starts playing the animation as soon as an AVI clip is loaded.
Applies to: Animation
Display a border to separate bands.
Applies to: Rebar
Default value: 1 for TreeView, otherwise 0
1 for TreeView, otherwise 0
For TreeViews, enables or disables the +/- buttons to expand/collapse tree items.
For Headers, if enabled header items look like push buttons and can be clicked.
For TabStrips, if enabled items look like push buttons.
Applies to: Header, TabStrip, TreeView
If 1, the button will correspond to the CANCEL action of a dialog, and its Click event will be fired by pressing the ESC key.
See also: "-dialogui", -cancel
Applies to: Button
Centers the animation in the control area.
Only enable computers to be selected.
Applies to: BrowseForFolder()
Identify the item as the default one; a default Button has a black border drawn around it; a default MenuItem is printed with a bold font.
Applies to: Button, MenuItem
Specifies the initial directory.
Applies to: GetOpenFileName()
Only show computers in the current domain or workgroup.
Only enable drives to be selected.
If 1, the dialog will include an edit field in which the user can type the name of an item.
Specifies a name that will appear on the dialog's edit field.
Default value: none
none
Fills the control rectangle ("black", "gray" and "white" are the window frame color, the desktop color and the window background color respectively).
Applies to: Label
[TBD]
Band position cannot be swapped.
Only enable folders to be selected (eg. no computers or printers).
The list will include files as well folders.
Specifies the maximum size (width and height) in pixels; X and Y must be passed in an array reference.
Example:
$Window = new Win32::GUI::Window( # ... -maxsize => [ 200, 200 ], );
See also: "-maxwidth", "-maxheight", -minsize
Applies to: DialogBox, Window
Specifies the minimum size (width and height) in pixels; X and Y must be passed in an array reference.
$Window = new Win32::GUI::Window( # ... -minsize => [ 100, 100 ], );
See also: "-minwidth", "-minheight", -maxsize
The control can have more than one line (note that in Textfield and RichEdit controls, newline is "\r\n", not "\n"!).
Applies to: RichEdit, TabStrip, Textfield, ToolBar
Specifies the selection type:
0 single selection 1 multiple selection 2 multiple selection ehnanced (with Shift, Control, etc.)
Applies to: Listbox
Defines the name for the control. The name is used to callback its events and to access its methods, so it is absolutely necessary, and each name must be unique in your application.
$Window->AddButton( -name => "Button1", # ... ); # methods... $Window->Button1->Hide(); # events... sub Button1_Click { # ... }
Applies to: Animation, Button, Checkbox, Class, Combobox, ComboboxEx, DateTime, DialogBox, Graphic, Groupbox, Header, Label, Listbox, ListView, NotifyIcon, ProgressBar, RadioButton, Rebar, RichEdit, Slider, Splitter, StatusBar, TabStrip, Textfield, Toolbar, TreeView, UpDown, Window
Enables the Click(), DblClick(), etc. events.
If 1, the button will correspond to the OK action of a dialog, and its Click event will be fired by pressing the ENTER key.
Applies to: BrowseForFolder(), GetOpenFileName()
Masks the user input (like password prompts).
See also: -passwordchar
Applies to: RichEdit, Textfield
Default value: '*'
'*'
The specified CHAR that is shown instead of the text with -password = 1>.
-password =
See also: -password
Defines the position for the window; note that X and Y must be passed in an array reference, eg:
-pos => [ 100, 100 ], # correct -pos => 100, 100, # WRONG -pos => @coords, # WRONG -pos => \@coors, # correct
See also: "-left", "-top"
Applies to: Animation, Button, Checkbox, Combobox, ComboboxEx, DateTime, DialogBox, Graphic, Groupbox, Header, Label, Listbox, ListView, ProgressBar, RadioButton, Rebar, RichEdit, Slider, Splitter, StatusBar, TabStrip, Textfield, TreeView, UpDown, Window
Only enable printers to be selected
The -prompt option is very special; if a string is passed, a Win32::GUI::Label object (with text set to the STRING passed) is created to the left of the Textfield.
$Window->AddTextfield( -name => "Username", -left => 75, -top => 150, -prompt => "Your name:", );
Furthermore, the value to -prompt can be a reference to a list containing the string and an additional parameter, which sets the width for the Label. If WIDTH is negative, it is calculated relative to the Textfield left coordinate.
-prompt
(Label left) (Textfield left) -left => 75, -prompt => [ "Your name:", 30 ], 75 105 (75+30) -left => 75, -prompt => [ "Your name:", -30 ], 45 (75-30) 75
Note that the Win32::GUI::Label object is named like the Textfield, with a "_Prompt" suffix (in the example above, the Label is named "Username_Prompt").
Text can't be changed.
The root directory for browsing; this can be either a path or one of the CSIDL_* constants for special folders (see the Win32::FileOp module by Jenda for a list of such constants).
Defines the size for the window; note that X and Y must be passed in an array reference, eg:
-size => [ 100, 100 ], # correct -size => 100, 100, # WRONG -size => @coords, # WRONG -size => \@coors, # correct
See also: "-width", "-height"
Uses a smooth bar instead of the default segmented bar.
Applies to: ProgressBar
Draws a half-sunken border around the control.
The text that will appear in the control or item.
Applies to: Animation, Button, Checkbox, Combobox, ComboboxEx, DateTime, DialogBox, Graphic, Groupbox, Header, Label, Listbox, ListView, ProgressBar, RadioButton, Rebar, RichEdit, Slider, Splitter, StatusBar, TabStrip, Textfield, Toolbar, TreeView, UpDown, Window, InsertBand()
The text that will appear as tooltip when the mouse is on the NotifyIcon.
Applies to: NotifyIcon
The title for the window or dialog box.
Applies to: DialogBox, Window, BrowseForFolder(), GetOpenFileName()
The window "stays on top" even when deactivated.
Draws the animation using a transparent background.
Specifies how the text is to be truncated:
0 the text is not truncated 1 the text is truncated at the end. word the text is truncated at the end of a word. path the text is truncated before the last "\" (used to shorten paths).
NOTE: this style does not seem to be working.
Default value: center
center
Defines the vertical alignment for the text in the Button.
Applies to: Button, CheckBox, RadioButton
Default value: 1 for Label, 0 for UpDown
1 for Label, 0 for UpDown
For Labels, the text wraps automatically to a new line. For UpDown controls, the counter wraps when it reaches the lower or upper limit.
Applies to: Label, UpDown
To install Win32::GUI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Win32::GUI
CPAN shell
perl -MCPAN -e shell install Win32::GUI
For more information on module installation, please visit the detailed CPAN module installation guide.