It works for me :(  Here's a code snippet from my program:
--
$gameNo = $newGameWin->AddTextfield(
        -top    =>      1,
        -left   =>      75,
        -height =>      23,
        -width  =>      50,
);
if (!exists $gameData{$gameNo->Text})
{}


"Jeremy K. Truax" wrote:
> 
> I tried that and it doesn't seem to work. It prints "$textField->Text" as:
> 
> Win32::GUI::DialogBox=HASH(0x650b2c)->Text
> 
> Aaron Dalton wrote:
> 
> > Use the Text property...like so:
> >
> > my $textField = $window->AddTextField(
> >         -name => 'password',
> >         -left => 3,
> >         -top  => 5,
> > );
> >
> > if ($textField->Text eq $storedPassword)
> > {}
> >
> > "Jeremy K. Truax" wrote:
> > >
> > > Ok I'm fairly new to Perl and its Win32 Module. I am trying to do
> > > something simple like get a value off of the input from the user. So I
> > > made a textfield in which they type in say their name....then I cannot
> > > get the value to the point where I can actually use it.
> > >
> > > For example:
> > >
> > > # here the dialog box object is created
> > >
> > > $myDialogBox = new Win32::GUI::DialogBox(
> > >    -name => "DialogBox",
> > >    -title => "DialogBox",
> > >    -top => 150,
> > >    -left => 170,
> > >    -width => 300,
> > >    -height => 150,
> > >    -visible => 1);
> > >
> > > # here I add the text field to type into
> > >
> > > $myDialogBox->AddTextfield(
> > >    -name => "TextField",
> > >    -password => 0,
> > >    -top => 40,
> > >    -left => 70,
> > >    -width => 90,
> > >    -height => 20,
> > >    -visible => 1);
> > >
> > > # here is the button which they click when done typing
> > >
> > > $myDialogBox->AddButton(
> > >    -name => "MyButton",
> > >    -text => "OK",
> > >    -top => 60,
> > >    -left => 70,
> > >    -visible => 1);
> > >
> > > # and here is what happens when they do click the button.
> > >
> > > sub MyButton_Click {
> > >  print "Hello $myDialogBox::TextField\n";
> > > }
> > >
> > > the last part is what I'm having trouble with. $myDialogBox::TextField
> > > doesn't seem the correct way to express the value of the text field.
> > > What do I use for this?
> > > In JavaScript the value is expressed like:
> > > "myDialogBox.TextField.value". But I don't know how to do that here.
> > >
> > > Please, let me know if you can help me....thanks.
> > >
> > > --
> > > Jeremy K. Truax
> > > [EMAIL PROTECTED]
> > > http://start.at/trupoetry
> > > =========================
> > > TruPoet's Romantic Love Poetry Yahoo! Club
> > > http://clubs.yahoo.com/clubs/trupoetsromanticlovepoetry
> > > ----------------------------
> > > A belief is just an idea a person possesses; it's an idea that possesses
> > > a person.
> >
> > --
> > -----BEGIN GEEK CODE BLOCK-----
> > Version: 3.1
> > GCS/IT d+ s+:+>: a->? C+++ ULC>+++ P++++$ L>+++ E-
> > W++$ N++(+) o>+ K++ w-- O@ M-- V PS-- PE++ Y+ PGP+
> > t+ 5+++ X+(++) R tv+ b+++ DI++(+++) D++ G e>+++
> > h+>---- r y-
> > ------END GEEK CODE BLOCK------
> 
> --
> Jeremy K. Truax
> [EMAIL PROTECTED]
> http://start.at/trupoetry
> =========================
> TruPoet's Romantic Love Poetry Yahoo! Club
> http://clubs.yahoo.com/clubs/trupoetsromanticlovepoetry
> ----------------------------
> A belief is just an idea a person possesses; it's an idea that possesses a
> person.

-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/IT d+ s+:+>: a->? C+++ ULC>+++ P++++$ L>+++ E-
W++$ N++(+) o>+ K++ w-- O@ M-- V PS-- PE++ Y+ PGP+
t+ 5+++ X+(++) R tv+ b+++ DI++(+++) D++ G e>+++
h+>---- r y-
------END GEEK CODE BLOCK------

Reply via email to