Marc,

You could give the button focus:

      $Win_info_srv->Button_ok_srv->SetFocus();

would do that.

To have "enter" press the button when another control had focus there
needs to be a way of getting the window to call your button click routine
when enter is pressed.  So far I've only seen this with Tk windows but
hopefully someone else knows how to do it with the GUI module.

Kev.



|---------+------------------------------------------------>
|         |           "NAHUM Marc"                         |
|         |           <[EMAIL PROTECTED]>    |
|         |           Sent by:                             |
|         |           [EMAIL PROTECTED]|
|         |           ceforge.net                          |
|         |                                                |
|         |                                                |
|         |           13/12/2002 09:46                     |
|         |                                                |
|---------+------------------------------------------------>
  
>----------------------------------------------------------------------------------------------|
  |                                                                             
                 |
  |       To:       "Win32-GUI Users" 
<perl-win32-gui-users@lists.sourceforge.net>               |
  |       cc:                                                                   
                 |
  |       Subject:  [perl-win32-gui-users] set button as default                
                 |
  
>----------------------------------------------------------------------------------------------|





how set a button as delault ?

when I put somthing like this :

$Win_info_srv->AddButton(
        -text    => "OK",
        -name    =>  "Button_ok_srv",
       -left     => 190,
       -top      => 185,
       -width   =>  50,
       -height  =>  21,
       -foreground =>  0,
       -tabstop =>  1,
       -default =>  1,
      );

the button is like default but I can't push "enter"  to validate ....

thanks for help ...





Reply via email to