Hello all, i'm a german editor of webdevelopement. i' playing to write a documentation for the Win32::GUI and also a detailed tutorial for a planed Book to Perl Developement on Win32 and specialy for GUI Developement.
My work will be published on Web, after doing ... but this could be taken a while ;.) Ok, what i do ist to check all available Widgets, but the documentation is a bit poor ;-) Any helps are welcome. My general questions: * Aldo, do you have some more documentation? * Will the Win32::GUI still develop? * Is ther a way to get all archived Mails of the old and new MailingLists ... ? First work i did is to play arround the Button-Widget. So this are my up to now conclusion: Question to options: * the background, foreground options seems not to be suppored on the Button-Widget? * are this all available options for the Button-Widget? Question to Styles: * Do you have any eg. for the usage of BS_BITMAP and BS_ICON? * Any eg. of the usage and description of BS_NOTIFY ,BS_OWNERDRAW and BS_PUSHBUTTON? Questions to Events: * Any Ideas to use GotFocus(), LostFocus(), MouseDown() and MouseUp()? something like that, doesn't work: sub Button_MouseDown() { print "Mouse Down"; return 1; } Eg. (hope this is correct ...) 1. Tabstop for Buttons * Set for all relevant Widgets the -tabstop option to 1. * Use $Your_window_name->{-dialogui} = 1; (You need this to realize Tabstop and ENTER Event) 2. Hit a Button on ENTER * Set for all relevant Widgets the -tabstop option to 1. * For commands set -ok option to 1 3. Set Button to default on loading * Set -default option to 1 4. Do action by click on ESC * Set -cancel option to 1 5. Get a dblClick Event * set -addstyle => BS_NOTIFY, ::AddButton(); ------------- *** Options *** -name => name of the widget -text => Caption -titel => same as -text -left => x-pos in px -top => y-pos in px -width => width -height => height -size => [width, height] -pos => [x-pos, y-pos] -align => left/center/right (default left) -valign => top/center/bottom (default center) -default => 0/1 (default 0) -ok => 0/1 (default 0) -cancel => 0/1 (default 0) -disabled => 0/1 (default 0) -font => Fontobject (needs ::Font) -addstyle => see Styles (more than one, separated by |) -visible => 0/1 (default 1) -tabstop => 0/1 (default 0) ***************************************************************** *** Styles *** BS_TOP|BS_VCENTER|BS_BOTTOM (use -valign option) BS_CENTER|BS_LEFT|BS_RIGHT (use -align option) BS_TEXT (no need to use) I think this sytles will be called internal of the Modul to display -text opitionl. Is this right? BS_DEFPUSHBUTTON Creates a push button that behaves like a BS_PUSHBUTTON style button, but also has a heavy black border. If the button is in a dialog box, the user can select the button by pressing the ENTER key, even when the button does not have the input focus. This style is useful for enabling the user to quickly select the most likely (default) option. BS_MULTILINE Wraps the button text to multiple lines if the text string is too long to fit on a single line in the button rectangle. This seems only has a effect by wraping the lines with \n inside the -text option. eg. -text => "I'm a long Button text.\nSo i have to get a wrap.", Problem: You have to adjust height and width of the Button. BS_BITMAP Specifies that the button displays a bitmap. BS_ICON Specifies that the button displays an icon. BS_USERBUTTON (obsolet, was only used for 16-bit Windows) BS_NOTIFY no exact idea .. any help for usage? (ok, i found, that this style could used to get the dblClick Event ...) BS_OWNERDRAW no exact idea .. any help for usage? BS_PUSHBUTTON no exact idea .. any help for usage? ***************************************************************** *** Events *** Click() This event is sent by a click on the button. DblClick() This event is sent by a dbl-click on the button. GotFocus() no exact idea .. any help for usage? LostFocus() no exact idea .. any help for usage? MouseDown() no exact idea .. any help for usage? MouseUp() no exact idea .. any help for usage? ***************************************************************** *** Eg. of AddButton usage: *** use Win32::GUI; $MainWindow = new Win32::GUI::Window( -pos => [100, 100], -size => [130, 110], -name => "Win", -text => "AddButton - eg.", ); $MainWindow->{-dialogui} = 1; $b1 = $MainWindow->AddButton( -name => "Button_1", -text => "I'm a normal-Button", -pos => [10, 10], -default => 1, -ok => 1, -tabstop => 1, -addstyle => BS_NOTIFY, ); $b2 = $MainWindow->AddButton( -name => "Button_2", -text => "I'm a close-Button", -pos => [10, 50], -cancel => 1, -tabstop => 1, ); $MainWindow->Show(); Win32::GUI::Dialog(); sub Win_Terminate { return -1; } sub Button_1_Click { print "Normal-Button was clicked.\n"; return 1; } sub Button_2_Click { Win_Terminate(); } sub Button_1_DblClick { print "Normal-Button was dbl-clicked.\n"; return 1; }