----- Original Message -----
From: Tim Haakenson <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 04, 1999 12:00 PM
Subject: [perl-win32-gui] Radio buttons etc.
> I am having some problems, and would appreciate any help.
>
> 1) Is there any way to query the state of a radio button?
>
> 2) Is there any way to set the initial state of a radio button?
Tim,
I have never used radio buttons but am working on solutions to the above
questions.
However I did answer your two other questions. ;]
> 3) Is there anyway to initially set the selection the drop down portion
> of a combo box?
# this chunk of code was taken from samples in the Win::GUI package
# I looked through the GUI.pm and found that you could do what you were
asking
$CBdropdown =
ndow->AddCombobox(
-name => "Dropdown",
-left => 10,
-top => 180,
-width => 250,
-height => 100,
-style => WS_VISIBLE | 2 | WS_NOTIFY,
);
$CBdropdown->InsertItem("item 1");
$CBdropdown->InsertItem("item 2");
$CBdropdown->InsertItem("item 3");
$Status = $Window->AddStatusBar(
-name => "Status",
-text => "Win32::GUI Combobox sample",
);
$CBdropdown->Select(0); ## This is what I added and tested. It works great. The
first
## in your combobox list is given the value of
0 (zero), the rest
## are numbered sequentially after that so the
second and third
## items in this example are 1 and 2
respectively.
## I am no GUI guru, but I hope this helps.
> 4) What is a zero-based index?
A zero-based index refers to an array (or as in the combobox example above, and item)
whose
initial value is zero. Some arrays begin with their first item being initialized with
a 1 (one). I have
noticed that Perl works this way with its array structures such as command line
parsing and others.
Jonathan Southwick
[EMAIL PROTECTED]
Technical & Network Services 814-332-2755
Allegheny College
Meadville, PA 16335
----------------------------------
***Everything is within walking distance if you've got the time ***
----- Original Message -----
From: Tim Haakenson <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 04, 1999 12:00 PM
Subject: [perl-win32-gui] Radio buttons etc.
> I am having some problems, and would appreciate any help.
>
> 1) Is there any way to query the state of a radio button?
>
> 2) Is there any way to set the initial state of a radio button?
>
> 3) Is there anyway to initially set the selection the drop down portion
> of a combo box?
# this chunk of code was taken from samples in the Win::GUI package
# I looked through the GUI.pm and found that you could do what you were
asking
$CBdropdown =
ndow->AddCombobox(
-name => "Dropdown",
-left => 10,
-top => 180,
-width => 250,
-height => 100,
-style => WS_VISIBLE | 2 | WS_NOTIFY,
);
$CBdropdown->InsertItem("item 1");
$CBdropdown->InsertItem("item 2");
$CBdropdown->InsertItem("item 3");
$Status = $Window->AddStatusBar(
-name => "Status",
-text => "Win32::GUI Combobox sample",
);
$CBdropdown->Select(0); ## This is what I added and tested. It works great. The
first
## in your combobox list is given the value of
0 (zero), the rest
## are numbered sequentially after that so the
second and third
## items in this example are 1 and 2
respectively.
## I am no GUI guru, but I hope this helps.
>
> 4) What is a zero-based index?
A zero-based index refers to an array (or as in the combobox example above, and item)
whose
initial value is zero. Some arrays begin with their first item being initialized with
a 1 (one). I have
noticed that Perl works this wa
y with its array structures such as command line parsing and others.
>
>
> Thanks,
> Tim Haakenson
>
>