[EMAIL PROTECTED] wrote:
> I am trying to learn Win32::GUI module and am going
> through the tutorials that were included with the module.
> However, when I try to create an edit field, there is not
> an text entry area.  What am I doing wrong?

> <Code snippet>
>$main->>AddTextfield(
>                 -name=>'Sample',
>                 -background=>[255,255,255],
>                 -left=>75,
>                 -top=>110,
>                 -prompt=>"Type here:",
>                 );
> <End of snippet>
>
> The end result is that I get the prompt but no text entry box.

try giving a -size to the Textfield, eg:

    $main->AddTextfield(
        -name=>'Sample',
        -background=>[255,255,255],
        -pos=>[75,110],
        -size=>[150,22],
        -prompt=>"Type here:",
    );

or a -text, eg:

    $main->AddTextfield(
        -name=>'Sample',
        -background=>[255,255,255],
        -pos=>[75,110],
        -prompt=>"Type here:",
        -text=>"sample text",
    );

if you don't specify a size, the control will be
automatically sized to fit the given text. but if you
don't specify a size and give no text, the control
is sized 0x0 pixels, thus it is invisible.
this is not a nice thing, and will eventually be
resolved by giving a default size (say, 150x22)
when the calculated size results in a 0x0.

cheers,

Aldo
[EMAIL PROTECTED]




Reply via email to