RE: [perl-win32-gui] Radio buttons etc.

1999-05-04 Thread O'Sullivan, Barry A



Hope this helps. ($W is the window)

$W-AddButton(
-name   = "Radiogroup1",
-left   = 96,
-top= 105,
-width  = 176,
-height = 75,
-text   = "Quote Access Method",
-style  = WS_VISIBLE | WS_CHILD | $BS_GROUPBOX,
);
$W-AddRadioButton(
-name = "optWeb",
-text = ("Web", 2),
-height = 24,
-left = 108,
-top = 125,
-width = 90,
);
$W-AddRadioButton(
-name = "optDB",
-text = ("Database", 2),
-height = 24,
-left = 108,
-top = 145,
-width = 90,
);

To query a radio button:

if ($W-optWeb-Checked()) {
$accesstype = "web";
}

To set initial state of a radio button:

$W-optWeb-Checked(1);


Barry

 -Original Message-
 From: Tim Haakenson [SMTP:[EMAIL PROTECTED]]
 Sent: Tuesday, May 04, 1999 12:00 PM
 To:   [EMAIL PROTECTED]
 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?
 
 4) What is a zero-based index?
 
 
 Thanks,
 Tim Haakenson




Re: [perl-win32-gui] Radio buttons etc.

1999-05-04 Thread Tim Haakenson

Barry  Jonathan,

I very much appreciate your responses.  The radio button problem is now
solved!  The main problem was that I could not find any "methods" for radio
buttons in the documentation.

Thanks again.
Tim Haakenson


O'Sullivan, Barry A wrote:

 Hope this helps. ($W is the window)

 $W-AddButton(
 -name   = "Radiogroup1",
 -left   = 96,
 -top= 105,
 -width  = 176,
 -height = 75,
 -text   = "Quote Access Method",
 -style  = WS_VISIBLE | WS_CHILD | $BS_GROUPBOX,
 );
 $W-AddRadioButton(
 -name = "optWeb",
 -text = ("Web", 2),
 -height = 24,
 -left = 108,
 -top = 125,
 -width = 90,
 );
 $W-AddRadioButton(
 -name = "optDB",
 -text = ("Database", 2),
 -height = 24,
 -left = 108,
 -top = 145,
 -width = 90,
 );

 To query a radio button:

 if ($W-optWeb-Checked()) {
 $accesstype = "web";
 }

 To set initial state of a radio button:

 $W-optWeb-Checked(1);

 Barry

  -Original Message-
  From: Tim Haakenson [SMTP:[EMAIL PROTECTED]]
  Sent: Tuesday, May 04, 1999 12:00 PM
  To:   [EMAIL PROTECTED]
  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?
 
  4) What is a zero-based index?
 
 
  Thanks,
  Tim Haakenson







[perl-win32-gui] Radio buttons etc.

1999-05-04 Thread Tim Haakenson

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?

4) What is a zero-based index?


Thanks,
Tim Haakenson





Re: [perl-win32-gui] Radio buttons etc.

1999-05-04 Thread Jonathan Southwick

  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.


Oops.  Thats a little unclear.  I meant perl uses the zero-based index, not
that it uses indexing starting at 1.
Sorry if I confused anyone.


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 ***