You can subscribe to this list here.
2001 |
Jan
(226) |
Feb
(139) |
Mar
(156) |
Apr
(95) |
May
(181) |
Jun
(166) |
Jul
(80) |
Aug
(59) |
Sep
(69) |
Oct
(83) |
Nov
(142) |
Dec
(33) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(42) |
Feb
(91) |
Mar
(76) |
Apr
(113) |
May
(67) |
Jun
(68) |
Jul
(37) |
Aug
(41) |
Sep
(16) |
Oct
(135) |
Nov
(51) |
Dec
(21) |
2003 |
Jan
(37) |
Feb
(36) |
Mar
(37) |
Apr
(103) |
May
(68) |
Jun
(70) |
Jul
(77) |
Aug
(12) |
Sep
(9) |
Oct
(53) |
Nov
(88) |
Dec
(63) |
2004 |
Jan
(263) |
Feb
(106) |
Mar
(36) |
Apr
(21) |
May
(21) |
Jun
(34) |
Jul
(33) |
Aug
(34) |
Sep
(35) |
Oct
(21) |
Nov
(43) |
Dec
(63) |
2005 |
Jan
(28) |
Feb
(42) |
Mar
(29) |
Apr
(14) |
May
(41) |
Jun
(20) |
Jul
(65) |
Aug
(136) |
Sep
(41) |
Oct
(74) |
Nov
(34) |
Dec
(94) |
2006 |
Jan
(85) |
Feb
(94) |
Mar
(68) |
Apr
(103) |
May
(66) |
Jun
(51) |
Jul
(24) |
Aug
(56) |
Sep
(57) |
Oct
(85) |
Nov
(73) |
Dec
(68) |
2007 |
Jan
(59) |
Feb
(32) |
Mar
(13) |
Apr
(32) |
May
(36) |
Jun
(36) |
Jul
(64) |
Aug
(35) |
Sep
(19) |
Oct
(10) |
Nov
(13) |
Dec
(20) |
2008 |
Jan
(26) |
Feb
(41) |
Mar
(19) |
Apr
(24) |
May
(16) |
Jun
(33) |
Jul
(34) |
Aug
(4) |
Sep
(11) |
Oct
|
Nov
(26) |
Dec
(23) |
2009 |
Jan
(5) |
Feb
(2) |
Mar
(21) |
Apr
(16) |
May
(13) |
Jun
(6) |
Jul
(34) |
Aug
(2) |
Sep
(1) |
Oct
(7) |
Nov
(5) |
Dec
(24) |
2010 |
Jan
(3) |
Feb
(5) |
Mar
(6) |
Apr
(6) |
May
(14) |
Jun
(6) |
Jul
(1) |
Aug
(12) |
Sep
(10) |
Oct
(9) |
Nov
|
Dec
(2) |
2011 |
Jan
(4) |
Feb
(5) |
Mar
(30) |
Apr
(1) |
May
(2) |
Jun
(5) |
Jul
(3) |
Aug
(2) |
Sep
(3) |
Oct
|
Nov
(6) |
Dec
|
2012 |
Jan
|
Feb
(10) |
Mar
|
Apr
|
May
(1) |
Jun
(3) |
Jul
(1) |
Aug
|
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(4) |
2013 |
Jan
(5) |
Feb
(3) |
Mar
|
Apr
(3) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
(2) |
Feb
|
Mar
|
Apr
(1) |
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(9) |
Nov
(7) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(5) |
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Daniel O. <Dan...@ma...> - 2002-08-28 14:21:03
|
Hi! I have a listview with items that I want to receive/get the name (-text) from the columnheaders when I click on them. I can get the index out ok, but how to get the text puzzles me. Anybody who know? Regards! / Daniel O. |
From: moo c. <mew...@ip...> - 2002-08-28 01:47:33
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"> <title></title> </head> <body> This problem is harder than it seems at first.<br> The main problem is how do I detect a right click on a menu (Such as the Exit option on the File menu found in most windows programs)?<br> <br> Also, to create the menu in your example I'd do;<br> $Menu = Win32::GUI::MakeMenu(<br> "Popup Menu" => "PopUpMenu",<br> "> &Edit" => "PopupEdit",<br> "> Exit" => "PopupExit",<br> );<br> or something similar right? When i put your code in the _Click action for the menu item, the menu pops up but is blank (no text appears on it, it's only a few pixels wide). Am I doing something wrong here?<br> <br> Nick<br> <br> Peter Eisengrein wrote:<br> <blockquote type="cite" cite="mid75B5E19362A8D611844C0008023E3337201624@MAIL-01"> <meta http-equiv="Content-Type" content="text/html; "> <meta name="Generator" content="MS Exchange Server version 5.5.2650.12"> <title>RE: [perl-win32-gui-users] right click menu items</title> <p><font size="2">Assuming $menu 'PopUpMenu' already exists, then do the following:</font></p> <p><font size="2">my ( $x, $y ) = Win32::GUI::GetCursorPos ();</font><br> <font size="2">$Window->TrackPopupMenu( $menu -> {'PopUpMenu'}, $x, $y );</font></p> <br> <br> <br> <p><font size="2">-----Original Message-----</font><br> <font size="2">From: moo cow [<a href="mailto:mew...@ip...">mailto:mew...@ip...</a>]</font> <br> <font size="2">Sent: Monday, August 26, 2002 22:28</font><br> <font size="2">To: <a class="moz-txt-link-abbreviated" href="mailto:per...@li...">per...@li...</a></font><br> <font size="2">Subject: [perl-win32-gui-users] right click menu items</font> </p> <br> <p><font size="2">Hi,</font><br> <font size="2">How do I make it so I can right click a menu item, and it brings up a popup menu?</font></p> <p><font size="2">Nick</font></p> <p><font size="2">------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! <a href="https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390" target="_blank">https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390</a> _______________________________________________ Perl-Win32-GUI-Users mailing list <a class="moz-txt-link-abbreviated" href="mailto:Per...@li...">Per...@li...</a> <a href="https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users</a></font></p> </blockquote> </body> </html> |
From: Syl <jk...@sk...> - 2002-08-28 00:30:31
|
> sub OKbutton_Click { .. gather data and return (-1); } > > When you return -1 in any event sub, not just in _Terminate, your window > gets destroyed. Since you cannot exit the Dialog() loop other than with -1, > there are but two ways to do it But that is my problem. I return(-1) to Setup() but the window is not terminated by _Terminate or OKbutton_Click. Why? > If you want the window gone while you do the error checking (something that > users, having entered potentially faulty information, will hate you to do), In fact I want to destroy the window after I gather the data (faults and all :) and reconstruct the window with some error messaging stuff displayed. Or can I ->Hide(), reconstruct and then ->Show()? Syl |
From: Piske, H. <Har...@bo...> - 2002-08-27 23:36:50
|
sub OKbutton_Click { .. gather data and return (-1); } When you return -1 in any event sub, not just in _Terminate, your window gets destroyed. Since you cannot exit the Dialog() loop other than with -1, there are but two ways to do it a) do the error checking inside an event (namely OK_Click). give an error message if it fails and return 1 to keep going. return -1 if it succeeds. Your outside loop vanishes, you just do your setup() call, which in turn calls Dialog() and when that returns, you're done. If you want the window gone while you do the error checking (something that users, having entered potentially faulty information, will hate you to do), then frame the error checking procedure with $Main->Hide(); and $Main->Show();. If it's a lengthy process, give the user an hourglas. There is also a way to have a long-running event sub and still enable the user to click on controls (to abort or just to pop up a message saying "hang on, I'm busy") b) if, for whatever reason, you need the error checking outside the Dialog() event loop, you'll have to do something really tricky with DoEvents(). Maybe this copy of an older post helps, but I advise against it. ==================================================== -----Original Message----- Sent: Thursday, November 15, 2001 03:08 Subject: RE: [perl-win32-gui-users] Some basic questions 1) How can I have a perl routine running as the master program with the Window just popping up as a dialog box and once I have modified the appropriate parameters, it just disappears and the command is given back to the background perl script ? You can have any number of windows defined and controls added. A window only shows after you issue the $Winvar->Show() method. After that, it just sits on your monitor. If you want it to interact with the user, you either need to go Win32::GUI::Dialog() once or Win32::GUI::DoEvents() periodically. If you want to take a window off the screen and reuse it later, your Window_Terminate event handler (subroutine) must not return -1. Returning 1 or -1 from _Terminate (should be any non-zero value, but in fact I found 2 to misbehave) destroys all your controls, even though they might still be visible on the screen. Go $Winvar->Hide() and return 0 - preventing the default action of destroying the window when control passes back from the _Terminate event handler. To Hide() from elsewhere, return 1 - or don't return at all. Later, you can simply Show() and Dialog() again. But see below on how to end the message loop if you return 0 from _Terminate. 2) How can I pass control objects as parameters to the perl subroutines, if i wish to come up with a generic GUI of myy own being called as a subroutine from within the main perl program ? You can create windows and their controls at any time. No problem creating controls dynamically, even after the window has been on the screen, i.e., from within an event handler. In that case, have your _Terminate handler return -1 and destroy the window. Next time you need another window, create one. That does leak some memory, but nothing serious. If your program is designed to run forever, you must get more inventive - reuse the window and all the controls you ever needed, only hiding those you don't currently want seen; for each new control check a hash to see which one to reuse and only create another when there is none that fits and so on. But again, this should not be necessary for a program with a reasonable running time. 3) Can I have two main windows open at a time ? Yes. One Dialog() call (or a loop with one DoEvents() call) passes control to the message loop - that is, all messages from all windows created within this perl session and task get processed and the appropriate event handler subs called. You just need to keep track of your termination: if you return -1 from ANY event handler, the message loop terminates and control passes back to your perl script after the Win32::GUI::Dialog() call. If you still have another window, you need to call Dialog() again. If you don't have another window and do Dialog(), your script hangs due to lack of events that could terminate the message loop. It is important to bear in mind how control is passed around, especially with more than one window active or with your intention of showing and hiding windows. Win32::GUI::Dialog() passes control to the message loop (inside the Win32::GUI xs C++ code). From there, the event subs get called. If one of them returns -1, the message loop returns and script execution resumes after the Dialog() line. This clearly implies, if one of your event handlers does a lot of lengthy stuff, your window appears to be frozen, because control does not pass back to the xs and no other event subs get called. There is an easy solution to this: call Win32::GUI::DoEvents() from within the bit of script that runs so long. Even if it is from within the event handler or a subroutine called from the event handler. The only trap is, beware of re-entering the same bit of script. Here's an example: # create window here $button1_active = 0; $return_value = 1; Win32::GUI::Dialog(); print "done.\n"; exit; Button1_Click { return 1 if $button1_active; # in case the user clicked on Button1 again $button1_active = 1; for (0..1000) { print "$_ "; Win32::GUI::DoEvents(); # this gives the user a chance to click Abort last unless $button1_active; # quit loop if (s)he did } $button1_active = 0; return $return_value; } Abort_Click { $button1_active = 0; return 1; } Window_Terminate { Abort_Click(); # don't forget that or the loop continues after the window is closed and destroyed $return_value = -1; # this also returns -1 from the event sub!! } business as usual if the script was not running, because the implicit return -1 destroys the window and stops the message loop, which was started by Win32::GUI::Dialog(). If the script was running, control passes back out of the inner message loop, which was started by Win32::GUI::DoEvents() inside the Button1_Click handler. The perl loop there finds the flag $button1_active zero and terminates. If this sub now would return 1 instead of the $return_value -1, the outer message loop, invoked by Win32::GUI::Dialog(), would not terminate - with the window already destroyed, because _Terminate did not return 0, the script would effectively hang, receiving no more messages. One more note: if you $Winvar->Hide() your window inside an event handler and then start your "background" script (this would in fact be a foreground script, because you only have one task here), your window would still be visible. Call Win32::GUI::DoEvents() one more time after Hide() to have the internal INVALIDATE and PAINT messages take the window off the screen. And don't forget to Show() the window when your script finishes or you won't receive any more messages except timer ticks - not even Window_Activate, because you can't activate a hidden window. |
From: Syl <jk...@sk...> - 2002-08-27 23:09:54
|
I have the following general structure that I am using to gather some intitialization data from the user. my $errormsg; do { setup(); errorcheck(); } until !$errormsg; sub setup { ... create GUI initialization window with user input fields and Win32::GUI::Dialog(); } sub OKbutton_Click { .. gather data and return (-1); } sub ::window_Terminate { return (-1); } sub errorcheck { ... check for errors in user input fields. If error return $errormsg else return(-1) ) For some reason I cannot figure out why main:: keeps creating new windows when there is an error and these windows cannot be terminated with OKbutton_Click or ::window_Terminate. Any suggestions? Syl |
From: Peter E. <Pet...@at...> - 2002-08-27 15:08:33
|
Assuming $menu 'PopUpMenu' already exists, then do the following: my ( $x, $y ) = Win32::GUI::GetCursorPos (); $Window->TrackPopupMenu( $menu -> {'PopUpMenu'}, $x, $y ); -----Original Message----- From: moo cow [mailto:mew...@ip...] Sent: Monday, August 26, 2002 22:28 To: per...@li... Subject: [perl-win32-gui-users] right click menu items Hi, How do I make it so I can right click a menu item, and it brings up a popup menu? Nick ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 _______________________________________________ Perl-Win32-GUI-Users mailing list Per...@li... https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users |
From: moo c. <mew...@ip...> - 2002-08-27 02:26:09
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"> <title></title> </head> <body> Hi,<br> How do I make it so I can right click a menu item, and it brings up a popup menu?<br> <br> Nick<br> <br> </body> </html> |
From: Johan L. <jo...@ba...> - 2002-08-26 22:16:07
|
At 08:10 2000-08-27 +0300, ra...@un... wrote: >1. Show up on full screen How to size it to the Desktop (don't know about the entire screen): Win32::GUI::GetDesktopWindow() Returns the handle of the desktop window. GetClientRect() Returns a four elements array defining the windows client area rectangle (left, top, right, bottom) or undef on errors. GetWindowRect() Same, but I think it's the outside. This should get you the values you want: my ($left, $top, $right, $bottom) = Win32::GUI::GetClientRect( Win32::GUI::GetDesktopWindow() ); If you don't want any title bar and border (remember the Exit button :), this is an old post on the subject: ---------- Joe wrote: >Is there a way to hide the title bar and/or frame of a window? I want to get >rid of the bar with the icon, name, and close buttons, and if possible get rid >of the frame around the entire window. If you use The GUI Loft you can easily do this by setting the Window property DialogBox to "Borderless" (it uses the class described below). If not, you can use the class Win32::GUI::BorderlessWindow when you create your Window (it uses the technique described below). It's available in The GUI Loft source distro, in the PPM\AdHoc\lib\Win32\GUI directory. Download here: http://www.bahnhof.se/~johanl/perl/Loft/ Or, if you're more of a copy-paste kind of guy, set the style to -style => 0x80000000, #WS_POPUP when you create your Win32::GUI::Window object. ---------- >3. Run another app based on the image shown and after the app finish >return back to this app system()? /J -------- ------ ---- --- -- -- -- - - - - - Johan Lindström Sourcerer @ Boss Casinos jo...@ba... Latest bookmark: "Taste for Makers" http://www.paulgraham.com/taste.html dmoz (1 of 7): /Computers/Programming/Languages/Lisp |
From: Johan L. <jo...@ba...> - 2002-08-26 22:02:36
|
At 16:38 2002-08-26 -0500, Gossett, Malachy wrote: >Well, it still doesn't look like I'm getting it, but I am trying to get >this to minimize to the sys tray. Anyone with experience in this see >where I am missing the boat? You never create a NotifyIcon, only an Icon. The following is from a small script of mine (Clipboard Transformer, hence the names). #Tray icon my $fileIcon = "resource/transformer.ico"; my $icoTray = new Win32::GUI::Icon($fileIcon) or die("Could not load icon ($fileIcon)\n"); #This is what actually puts the icon in the tray my $niTray = Win32::GUI::NotifyIcon->new($winTransformer, -name => "niTray", -id => 1, -icon => $icoTray, -tip => $textNameProgram, ); So in an event (either the window's Minimize event, or a buttons Click event, or whatever), you Hide() your window. Only the tray icon is left for the user to click on. In the events for the NofifyIcon, you Show() the window (or display a popup menu or something): sub ::niTray_Click { return(::niTray_RightClick(@_)); } sub ::niTray_RightClick { #Here you Show() your window again. return(1); } /J -------- ------ ---- --- -- -- -- - - - - - Johan Lindström Sourcerer @ Boss Casinos jo...@ba... Latest bookmark: "Taste for Makers" http://www.paulgraham.com/taste.html dmoz (1 of 7): /Computers/Programming/Languages/Lisp |
From: Gossett, M. <mal...@ve...> - 2002-08-26 21:38:42
|
Well, it still doesn't look like I'm getting it, but I am trying to get this to minimize to the sys tray. Anyone with experience in this see where I am missing the boat? =20 Thanks in advance =20 Mal =20 # Hello.pl script from SourceForge.Net =20 use Win32::GUI; =20 $MW =3D new Win32::GUI::Window( -title =3D> 'hello.pl', -left =3D> 100, -top =3D> 100, -width =3D> 250, -height =3D> 100, -name =3D> 'MainWindow', -visible =3D> 1, ); =20 $hello =3D $MW->AddButton( -text =3D> 'Hello, world', -name =3D> 'Hello', -left =3D> 25, -top =3D> 25, ); =20 $goodbye =3D $MW->AddButton( -text =3D> 'Goodbye World', -name =3D> 'Goodbye', -left =3D> 125, -top =3D> 25, ); =20 $SysTray =3D new Win32::GUI::Icon('CAMEL.ICO'); =20 $MW->Show(); $rc =3D Win32::GUI::Dialog(0); =20 sub MainWindow_Terminate { $MW->PostQuitMessage(1); # return -1; } =20 sub Hello_Click=20 { if($MW->Hello->Text eq "Hello, world")=20 { =20 $MW->Hello->{-text} =3D "OneMoreTime"; } else { print STDOUT "Hello, world\n"; $MW->PostQuitMessage(0); } } sub Goodbye_Click=20 { if($MW->Goodbye->Text eq "Goodbye World")=20 { $MW->Goodbye->{-text} =3D "OneMoreTime"; } else { print STDOUT "Goodbye, world\n"; $MW->PostQuitMessage(0); } } =20 sub SysTray_Click { print "Here! \n"; =20 $MW->Hide(); $MW->Disable(); =20 }=20 =20 sub Restore_Click { $MW->Enable(); $MW->Show(); } =20 =20 |
From: Gossett, M. <mal...@ve...> - 2002-08-26 18:01:19
|
ok, that helps. That's what I presume. I'm used to explicidly calling subroutines (ie, &Hello_Click()), etc. =20 =20 This makes more sense, as I am trying to modify this example to minimize to the sys tray, and of couse, it doesn't. =20 Thanks =20 Mal -----Original Message----- From: Peter Eisengrein [mailto:Pet...@at...]=20 Sent: Monday, August 26, 2002 10:57 AM To: Gossett, Malachy; per...@li... Subject: RE: [perl-win32-gui-users] first app ? =09 =09 The subs are called by events, such as Click, RightClick, etc. Any handle such as Hello (which in this case is defined as the name of the button) can have one or more of these actions assigned to them. The convention for these subs is Name_Event where _Event is appended to the widget's name, i.e. Hello_Click is run when Hello (the button) gets a single click from the user. HTH,=20 Pete=20 > -----Original Message-----=20 > From: Gossett, Malachy [mailto:mal...@ve...]=20 > Sent: Monday, August 26, 2002 13:33=20 > To: per...@li...=20 > Subject: RE: [perl-win32-gui-users] first app ?=20 >=20 >=20 > Johan, that is a pretty good explanation. I'm a bit new to=20 > Win32::GUI,=20 > having used TK more, but never became a super user with it=20 > either. Once=20 > question I have, I notice that subroutines don't need=20 > specific calls, so=20 > how do they get called.=20 >=20 > A perfect example would be the hello.pl from th 665 source=20 > release. How=20 > are the subroutines being called in this?=20 >=20 > Thanks=20 >=20 > Mal=20 >=20 > use Win32::GUI;=20 > $MW =3D new Win32::GUI::Window(=20 > -title =3D> 'hello.pl',=20 > -left =3D> 100,=20 > -top =3D> 100,=20 > -width =3D> 150,=20 > -height =3D> 100,=20 > -name =3D> 'MainWindow',=20 > -visible =3D> 1,=20 > );=20 >=20 > #Add controls=20 > my $label =3D $MW->AddLabel(-text =3D> "This is my text.",=20 > -font =3D> $font);=20 >=20 > $hello =3D $MW->AddButton(=20 > -text =3D> 'Hello, world',=20 > -name =3D> 'Hello',=20 > -left =3D> 25,=20 > -top =3D> 25,=20 > );=20 >=20 > $MW->Show();=20 > $rc =3D Win32::GUI::Dialog(0);=20 >=20 > sub MainWindow_Terminate {=20 > $MW->PostQuitMessage(1);=20 > # return -1;=20 > }=20 >=20 > sub Hello_Click {=20 > if($MW->Hello->Text eq "Hello, world") {=20 > $MW->Hello->{-text} =3D "OneMoreTime";=20 > } else {=20 > print STDOUT "Hello, world\n";=20 > $MW->PostQuitMessage(0);=20 > }=20 > }=20 >=20 >=20 > -----Original Message-----=20 > From: Johan Lindstrom [mailto:jo...@ba...]=20 > Sent: Monday, August 26, 2002 10:21 AM=20 > To: per...@li...=20 > Subject: Re: [perl-win32-gui-users] first app ?=20 >=20 >=20 > At 08:03 2000-08-27 +0300, ra...@un... wrote:=20 > >I've just installed win32::gui but how i will do my first=20 > app if I try=20 > >this :=20 > >=20 > >use Win32::GUI;=20 > >my $w =3D new Win32::GUI(-name =3D> 'XX');=20 > >$w->Show();=20 > >=20 > >But the window just got created and destroyed imedietly !?! Why this=20 > >happen ?=20 >=20 > Unlike your vanilla Perl program, most event based programs=20 > run what's=20 > called a main event loop. A GUI is most often event based. It=20 > means that=20 >=20 > you start it, and then it sits there waiting for user input (events,=20 > like=20 > mouse clicks on buttons, or timers being triggered).=20 >=20 > In Win32::GUI, you enter the main loop by calling=20 > Win32::GUI::Dialog(),=20 > so=20 > you should add that to your program, after the Show().=20 >=20 > Before entering the main loop you should have created all your windows=20 > (and=20 > Show():ed the ones you want visible from the beginning). In most cases=20 > you=20 > should never call Win32::GUI::Dialog() more than once in your program.=20 >=20 > After you call Win32::GUI::Dialog(), the only way to exit is from an=20 > event.=20 > This happens when an event handler returns -1. Typically, the=20 > Terminate=20 > event handler of your application window should return -1. In=20 > your case:=20 >=20 > sub XX_Terminate {=20 > return(-1);=20 > }=20 >=20 > In other cases, you want to Hide() the window (and return 0) in the=20 > Terminate event handler instead, so you can Show() it again at a later=20 > time.=20 >=20 >=20 > /J=20 >=20 > -------- ------ ---- --- -- -- -- - - - - -=20 > Johan Lindstr=F6m Sourcerer @ Boss Casinos jo...@ba...=20 >=20 > Latest bookmark: "Salon.com Technology I come to bury IAmCarbona..."=20 > <http://www.salon.com/tech/feature/2002/08/03/deleteddomains/i ndex.html>=20 dmoz (1 of 13): /Computers/Internet/On_the_Web/Weblogs/Tools=20 -------------------------------------------------------=20 This sf.net email is sponsored by: OSDN - Tired of that same old cell=20 phone? Get a new here for FREE!=20 https://www.inphonic.com/r.asp?r=3Dsourceforge1&refcode1=3Dvs3390=20 _______________________________________________=20 Perl-Win32-GUI-Users mailing list=20 Per...@li...=20 =09 https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users=20 -------------------------------------------------------=20 This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE!=20 https://www.inphonic.com/r.asp?r=3Dsourceforge1&refcode1=3Dvs3390=20 _______________________________________________=20 Perl-Win32-GUI-Users mailing list=20 Per...@li...=20 =09 https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users=20 |
From: Peter E. <Pet...@at...> - 2002-08-26 17:56:41
|
The subs are called by events, such as Click, RightClick, etc. Any = handle such as Hello (which in this case is defined as the name of the button) = can have one or more of these actions assigned to them. The convention for = these subs is Name_Event where _Event is appended to the widget's name, i.e. Hello_Click is run when Hello (the button) gets a single click from the user. HTH, Pete > -----Original Message----- > From: Gossett, Malachy [mailto:mal...@ve...] > Sent: Monday, August 26, 2002 13:33 > To: per...@li... > Subject: RE: [perl-win32-gui-users] first app ? >=20 >=20 > Johan, that is a pretty good explanation. I'm a bit new to=20 > Win32::GUI, > having used TK more, but never became a super user with it=20 > either. Once > question I have, I notice that subroutines don't need=20 > specific calls, so > how do they get called. >=20 > A perfect example would be the hello.pl from th 665 source=20 > release. How > are the subroutines being called in this? >=20 > Thanks >=20 > Mal >=20 > use Win32::GUI; > $MW =3D new Win32::GUI::Window( > -title =3D> 'hello.pl', > -left =3D> 100, > -top =3D> 100, > -width =3D> 150, > -height =3D> 100, > -name =3D> 'MainWindow', > -visible =3D> 1, > ); >=20 > #Add controls > my $label =3D $MW->AddLabel(-text =3D> "This is my text.",=20 > -font =3D> $font); >=20 > $hello =3D $MW->AddButton( > -text =3D> 'Hello, world', > -name =3D> 'Hello', > -left =3D> 25, > -top =3D> 25, > ); >=20 > $MW->Show(); > $rc =3D Win32::GUI::Dialog(0); >=20 > sub MainWindow_Terminate { > $MW->PostQuitMessage(1); > # return -1; > } >=20 > sub Hello_Click { > if($MW->Hello->Text eq "Hello, world") { > $MW->Hello->{-text} =3D "OneMoreTime"; > } else { > print STDOUT "Hello, world\n"; > $MW->PostQuitMessage(0); > } > } >=20 >=20 > -----Original Message----- > From: Johan Lindstrom [mailto:jo...@ba...]=20 > Sent: Monday, August 26, 2002 10:21 AM > To: per...@li... > Subject: Re: [perl-win32-gui-users] first app ? >=20 >=20 > At 08:03 2000-08-27 +0300, ra...@un... wrote: > >I've just installed win32::gui but how i will do my first=20 > app if I try=20 > >this : > > > >use Win32::GUI; > >my $w =3D new Win32::GUI(-name =3D> 'XX'); > >$w->Show(); > > > >But the window just got created and destroyed imedietly !?! Why this = > >happen ? >=20 > Unlike your vanilla Perl program, most event based programs=20 > run what's=20 > called a main event loop. A GUI is most often event based. It=20 > means that >=20 > you start it, and then it sits there waiting for user input (events, > like=20 > mouse clicks on buttons, or timers being triggered). >=20 > In Win32::GUI, you enter the main loop by calling=20 > Win32::GUI::Dialog(), > so=20 > you should add that to your program, after the Show(). >=20 > Before entering the main loop you should have created all your = windows > (and=20 > Show():ed the ones you want visible from the beginning). In most = cases > you=20 > should never call Win32::GUI::Dialog() more than once in your = program. >=20 > After you call Win32::GUI::Dialog(), the only way to exit is from an > event.=20 > This happens when an event handler returns -1. Typically, the=20 > Terminate=20 > event handler of your application window should return -1. In=20 > your case: >=20 > sub XX_Terminate { > return(-1); > } >=20 > In other cases, you want to Hide() the window (and return 0) in the=20 > Terminate event handler instead, so you can Show() it again at a = later > time. >=20 >=20 > /J >=20 > -------- ------ ---- --- -- -- -- - - - - - > Johan Lindstr=F6m Sourcerer @ Boss Casinos jo...@ba... >=20 > Latest bookmark: "Salon.com Technology I come to bury IAmCarbona..." > <http://www.salon.com/tech/feature/2002/08/03/deleteddomains/i ndex.html> dmoz (1 of 13): /Computers/Internet/On_the_Web/Weblogs/Tools ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=3Dsourceforge1&refcode1=3Dvs3390 _______________________________________________ Perl-Win32-GUI-Users mailing list Per...@li... https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=3Dsourceforge1&refcode1=3Dvs3390 _______________________________________________ Perl-Win32-GUI-Users mailing list Per...@li... https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users |
From: Gossett, M. <mal...@ve...> - 2002-08-26 17:32:41
|
Johan, that is a pretty good explanation. I'm a bit new to Win32::GUI, having used TK more, but never became a super user with it either. Once question I have, I notice that subroutines don't need specific calls, so how do they get called. A perfect example would be the hello.pl from th 665 source release. How are the subroutines being called in this? Thanks Mal use Win32::GUI; $MW =3D new Win32::GUI::Window( -title =3D> 'hello.pl', -left =3D> 100, -top =3D> 100, -width =3D> 150, -height =3D> 100, -name =3D> 'MainWindow', -visible =3D> 1, ); #Add controls my $label =3D $MW->AddLabel(-text =3D> "This is my text.",=20 -font =3D> $font); $hello =3D $MW->AddButton( -text =3D> 'Hello, world', -name =3D> 'Hello', -left =3D> 25, -top =3D> 25, ); $MW->Show(); $rc =3D Win32::GUI::Dialog(0); sub MainWindow_Terminate { $MW->PostQuitMessage(1); # return -1; } sub Hello_Click { if($MW->Hello->Text eq "Hello, world") { $MW->Hello->{-text} =3D "OneMoreTime"; } else { print STDOUT "Hello, world\n"; $MW->PostQuitMessage(0); } } -----Original Message----- From: Johan Lindstrom [mailto:jo...@ba...]=20 Sent: Monday, August 26, 2002 10:21 AM To: per...@li... Subject: Re: [perl-win32-gui-users] first app ? At 08:03 2000-08-27 +0300, ra...@un... wrote: >I've just installed win32::gui but how i will do my first app if I try=20 >this : > >use Win32::GUI; >my $w =3D new Win32::GUI(-name =3D> 'XX'); >$w->Show(); > >But the window just got created and destroyed imedietly !?! Why this=20 >happen ? Unlike your vanilla Perl program, most event based programs run what's=20 called a main event loop. A GUI is most often event based. It means that you start it, and then it sits there waiting for user input (events, like=20 mouse clicks on buttons, or timers being triggered). In Win32::GUI, you enter the main loop by calling Win32::GUI::Dialog(), so=20 you should add that to your program, after the Show(). Before entering the main loop you should have created all your windows (and=20 Show():ed the ones you want visible from the beginning). In most cases you=20 should never call Win32::GUI::Dialog() more than once in your program. After you call Win32::GUI::Dialog(), the only way to exit is from an event.=20 This happens when an event handler returns -1. Typically, the Terminate=20 event handler of your application window should return -1. In your case: sub XX_Terminate { return(-1); } In other cases, you want to Hide() the window (and return 0) in the=20 Terminate event handler instead, so you can Show() it again at a later time. /J -------- ------ ---- --- -- -- -- - - - - - Johan Lindstr=F6m Sourcerer @ Boss Casinos jo...@ba... Latest bookmark: "Salon.com Technology I come to bury IAmCarbona..." <http://www.salon.com/tech/feature/2002/08/03/deleteddomains/index.html> dmoz (1 of 13): /Computers/Internet/On_the_Web/Weblogs/Tools ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=3Dsourceforge1&refcode1=3Dvs3390 _______________________________________________ Perl-Win32-GUI-Users mailing list Per...@li... https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users |
From: Johan L. <jo...@ba...> - 2002-08-26 17:21:46
|
At 08:03 2000-08-27 +0300, ra...@un... wrote: >I've just installed win32::gui but how i will do my first app if I try this : > >use Win32::GUI; >my $w = new Win32::GUI(-name => 'XX'); >$w->Show(); > >But the window just got created and destroyed imedietly !?! Why this happen ? Unlike your vanilla Perl program, most event based programs run what's called a main event loop. A GUI is most often event based. It means that you start it, and then it sits there waiting for user input (events, like mouse clicks on buttons, or timers being triggered). In Win32::GUI, you enter the main loop by calling Win32::GUI::Dialog(), so you should add that to your program, after the Show(). Before entering the main loop you should have created all your windows (and Show():ed the ones you want visible from the beginning). In most cases you should never call Win32::GUI::Dialog() more than once in your program. After you call Win32::GUI::Dialog(), the only way to exit is from an event. This happens when an event handler returns -1. Typically, the Terminate event handler of your application window should return -1. In your case: sub XX_Terminate { return(-1); } In other cases, you want to Hide() the window (and return 0) in the Terminate event handler instead, so you can Show() it again at a later time. /J -------- ------ ---- --- -- -- -- - - - - - Johan Lindström Sourcerer @ Boss Casinos jo...@ba... Latest bookmark: "Salon.com Technology I come to bury IAmCarbona..." <http://www.salon.com/tech/feature/2002/08/03/deleteddomains/index.html> dmoz (1 of 13): /Computers/Internet/On_the_Web/Weblogs/Tools |
From: <ra...@un...> - 2002-08-26 17:14:06
|
hi, after u probably answered my first question :"), here are the next ones.. I want to create app that will do the following : 1. Show up on full screen 2. Do a controled (by the arrow keys) slide show... (not time based) 3. Run another app based on the image shown and after the app finish return back to this app Could u guide me.. Thanx alot in advance raptor |
From: <ra...@un...> - 2002-08-26 17:05:28
|
hi, I've just installed win32::gui but how i will do my first app if I try this : use Win32::GUI; my $w = new Win32::GUI(-name => 'XX'); $w->Show(); But the window just got created and destroyed imedietly !?! Why this happen ? Thanx alot in advance raptor PS. Could u just place in the SYNOPSYS of the Win32::GUI the minimum running app, as it is in all CPAN modules |
From: <jea...@kb...> - 2002-08-26 10:34:46
|
I will be out of the office starting 23/08/2002 and will not return until 16/09/2002. verlof ____________________________________________________ DISCLAIMER This e-mail and any attached files are confidential and may be legally privileged. If you are not the addressee, any disclosure, reproduction, copying, distribution, or other dissemination or use of this communication is strictly prohibited. If you have received this transmission in error please notify KBC immediately and then delete this e-mail. KBC does not accept liability for the correct and complete transmission of the information, nor for any delay or interruption of the transmission, nor for damages arising from the use of or reliance on the information. All e-mail messages addressed to, received or sent by KBC or KBC employees are deemed to be professional in nature. Accordingly, the sender or recipient of these messages agrees that they may be read by other KBC employees than the official recipient or sender in order to ensure the continuity of work-related activities and allow supervision thereof. |
From: Scott G. <sc...@ti...> - 2002-08-24 17:12:02
|
New to the list and to Win32::GUI, but I've purused enough to be convinced that WM_CLOSE event is not handled in GUI.xs. Any chance that: 1) There is a way to handle WM_CLOSE that I just haven't found yet? 2) Code could be added to trap WM_CLOSE, and a perl method {window}_EndTask could be called? I saw a post about this (think it was March 2002), but no replies to it. Thanks in advance, Scott -- Scott Gibson *** sc...@ti... |
From: Alex L. <sim...@ya...> - 2002-08-20 19:28:44
|
Hi does anyone know how to change the backcolor for a specific index in listview. I basically want to alternate colors of each row. Currently I use the TextBkColor([color]) function, but that would always change every row color to the last color I specify. example blue, green, blue -- would set every row to blue! Thanks! Alex ;) ===== ************************** ***** END OF MESSAGE ***** __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com |
From: Leone, D. <DL...@SI...> - 2002-08-19 19:51:20
|
How do I install the .665 GUI package? I usally install from ppm but that doesn't have the latest version. Thanks,Danny |
From: Johan L. <jo...@ba...> - 2002-08-13 13:15:50
|
At 18:18 2002-08-12 -0700, scott sager wrote: > I tried the demo (password) on the website and get the same error > for all the demos (something like a Prototype mismatch) (See Below) I tried to help you yesterday on the TGL mailing list. Did you not read that, or did that not work? > IF ANYONE CAN CAN HELP ME I WOULD SINCERELY APPRECIATE IT > !!!! PLEASE REPLY TO <mailto:SR_...@YA...>SR_...@YA... Ah... Don't you think it seems like a good idea to actually subscribe? Now that you have problems and all? Anyway, this is what I wrote yesterday: Something with Perl 5.6.1 and/or Win32::GUI 0.0.665 seems to have messed up Win32.pm and Win32::GUI.pm living together in peace. Try replacing: use Win32; with use Win32 (); wherever you find it (like in the demo program) and see if that works better. /J -------- ------ ---- --- -- -- -- - - - - - Johan Lindström Sourcerer @ Boss Casinos jo...@ba... Latest bookmark: "Picking Up Perl - Table of Contents" http://www.ebb.org/PickingUpPerl/pickingUpPerl_toc.html dmoz (1 of 4): ...amming/Languages/Perl/FAQs,_Help,_and_Tutorials |
From: H C <key...@ya...> - 2002-08-13 12:46:22
|
Scott, Couple of things. First, what version of Perl are you running? Type "perl -v" and get the build number...you may need to update your install of Perl. Second...it doesn't sound as if you had any trouble installing Win32::GUI...sounds like the install worked fine. If your demos aren't working, say so in the subject line. Third...the errors seem to be with the GUILoft demos. What happens w/ the demos that ship with Win32::GUI? Or better yet, what happens when you write your own script and run it? --- scott sager <sr_...@ya...> wrote: > > Dear Fellow Perl GUI Heads, > > I am a newbe to Win32::GUI. I followed all > the instructions but cant get it to install. The > demo's bomb. I really have big plans for this if I > can get it to work. Can anyone help me: > > I installed the latest build: > Win32-GUI-0.0.665-PPM.tar.gz on my Windows 2000 and > WindowsXP platforms. I am running ActiveState Perl. > > I performed the install as outlined in the > read.me : (i.e. ppm install Win32-GUI.ppd) > Everything went okay. > > I tried the demo (password) on the website > and get the same error for all the demos (something > like a Prototype mismatch) (See Below) > > IF ANYONE CAN CAN HELP ME I WOULD SINCERELY > APPRECIATE IT !!!! PLEASE REPLY TO > SR_...@YA... > > Error Message Follows: > > > C:\Documents and > Settings\Scott\Desktop\TheGUILoft\Demo\Password>password.pl > Prototype mismatch: sub main::MB_ICONHAND vs () at > C:/Program Files/Perl/lib/Exp > orter.pm line 57. > Exporter::import('NULL', 'WIN31_CLASS', > 'OWNER_SECURITY_INFORMATION', 'G > ROUP_SECURITY_INFORMATION', > 'DACL_SECURITY_INFORMATION', 'SACL_SECURITY_INFORMAT > ION', 'MB_ICONHAND', 'MB_ICONQUESTION', ...) called > at C:\Documents and Settings > \Scott\Desktop\TheGUILoft\Demo\Password\Password.pl > line 28 > main::BEGIN() called at C:/Program > Files/Perl/site/lib/Win32.pm line 28 > eval {...} called at C:/Program > Files/Perl/site/lib/Win32.pm line 28 > Prototype mismatch: sub main::MB_ICONQUESTION vs () > at C:/Program Files/Perl/lib > /Exporter.pm line 57. > Exporter::import('NULL', 'WIN31_CLASS', > 'OWNER_SECURITY_INFORMATION', 'G > ROUP_SECURITY_INFORMATION', > 'DACL_SECURITY_INFORMATION', 'SACL_SECURITY_INFORMAT > ION', 'MB_ICONHAND', 'MB_ICONQUESTION', ...) called > at C:\Documents and Settings > \Scott\Desktop\TheGUILoft\Demo\Password\Password.pl > line 28 > main::BEGIN() called at C:/Program > Files/Perl/site/lib/Win32.pm line 28 > eval {...} called at C:/Program > Files/Perl/site/lib/Win32.pm line 28 > Prototype mismatch: sub main::MB_ICONEXCLAMATION vs > () at C:/Program Files/Perl/ > lib/Exporter.pm line 57. > Exporter::import('NULL', 'WIN31_CLASS', > 'OWNER_SECURITY_INFORMATION', 'G > ROUP_SECURITY_INFORMATION', > 'DACL_SECURITY_INFORMATION', 'SACL_SECURITY_INFORMAT > ION', 'MB_ICONHAND', 'MB_ICONQUESTION', ...) called > at C:\Documents and Settings > \Scott\Desktop\TheGUILoft\Demo\Password\Password.pl > line 28 > main::BEGIN() called at C:/Program > Files/Perl/site/lib/Win32.pm line 28 > eval {...} called at C:/Program > Files/Perl/site/lib/Win32.pm line 28 > Prototype mismatch: sub main::MB_ICONASTERISK vs () > at C:/Program Files/Perl/lib > /Exporter.pm line 57. > Exporter::import('NULL', 'WIN31_CLASS', > 'OWNER_SECURITY_INFORMATION', 'G > ROUP_SECURITY_INFORMATION', > 'DACL_SECURITY_INFORMATION', 'SACL_SECURITY_INFORMAT > ION', 'MB_ICONHAND', 'MB_ICONQUESTION', ...) called > at C:\Documents and Settings > \Scott\Desktop\TheGUILoft\Demo\Password\Password.pl > line 28 > main::BEGIN() called at C:/Program > Files/Perl/site/lib/Win32.pm line 28 > eval {...} called at C:/Program > Files/Perl/site/lib/Win32.pm line 28 > Prototype mismatch: sub main::MB_ICONWARNING vs () > at C:/Program Files/Perl/lib/ > Exporter.pm line 57. > Exporter::import('NULL', 'WIN31_CLASS', > 'OWNER_SECURITY_INFORMATION', 'G > ROUP_SECURITY_INFORMATION', > 'DACL_SECURITY_INFORMATION', 'SACL_SECURITY_INFORMAT > ION', 'MB_ICONHAND', 'MB_ICONQUESTION', ...) called > at C:\Documents and Settings > \Scott\Desktop\TheGUILoft\Demo\Password\Password.pl > line 28 > main::BEGIN() called at C:/Program > Files/Perl/site/lib/Win32.pm line 28 > eval {...} called at C:/Program > Files/Perl/site/lib/Win32.pm line 28 > Prototype mismatch: sub main::MB_ICONERROR vs () at > C:/Program Files/Perl/lib/Ex > porter.pm line 57. > Exporter::import('NULL', 'WIN31_CLASS', > 'OWNER_SECURITY_INFORMATION', 'G > ROUP_SECURITY_INFORMATION', > 'DACL_SECURITY_INFORMATION', 'SACL_SECURITY_INFORMAT > ION', 'MB_ICONHAND', 'MB_ICONQUESTION', ...) called > at C:\Documents and Settings > \Scott\Desktop\TheGUILoft\Demo\Password\Password.pl > line 28 > main::BEGIN() called at C:/Program > Files/Perl/site/lib/Win32.pm line 28 > eval {...} called at C:/Program > Files/Perl/site/lib/Win32.pm line 28 > Prototype mismatch: sub main::MB_ICONINFORMATION vs > () at C:/Program Files/Perl/ > lib/Exporter.pm line 57. > Exporter::import('NULL', 'WIN31_CLASS', > 'OWNER_SECURITY_INFORMATION', 'G > ROUP_SECURITY_INFORMATION', > 'DACL_SECURITY_INFORMATION', 'SACL_SECURITY_INFORMAT > ION', 'MB_ICONHAND', 'MB_ICONQUESTION', ...) called > at C:\Documents and Settings > \Scott\Desktop\TheGUILoft\Demo\Password\Password.pl > line 28 > main::BEGIN() called at C:/Program > Files/Perl/site/lib/Win32.pm line 28 > eval {...} called at C:/Program > Files/Perl/site/lib/Win32.pm line 28 > Prototype mismatch: sub main::MB_ICONSTOP vs () at > C:/Program Files/Perl/lib/Exp > orter.pm line 57. > Exporter::import('NULL', 'WIN31_CLASS', > 'OWNER_SECURITY_INFORMATION', 'G > ROUP_SECURITY_INFORMATION', > 'DACL_SECURITY_INFORMATION', 'SACL_SECURITY_INFORMAT > ION', 'MB_ICONHAND', 'MB_ICONQUESTION', ...) called > at C:\Documents and Settings > \Scott\Desktop\TheGUILoft\Demo\Password\Password.pl > line 28 > main::BEGIN() called at C:/Program > Files/Perl/site/lib/Win32.pm line 28 > eval {...} called at C:/Program > Files/Perl/site/lib/Win32.pm line 28 > Can't locate Win32/GUI/Loft/Design.pm in @INC (@INC > contains: C:/Program Files/P > erl/lib C:/Program Files/Perl/site/lib .) at > C:\Documents and Settings\Scott\Des > ktop\TheGUILoft\Demo\Password\Password.pl line 29. > BEGIN failed--compilation aborted at C:\Documents > and Settings\Scott\Desktop\The > GUILoft\Demo\Password\Password.pl line 29. > > > > > > --------------------------------- > Do You Yahoo!? > HotJobs, a Yahoo! service - Search Thousands of New Jobs __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com |
From: moo c. <mew...@ip...> - 2002-08-13 02:10:48
|
Hi, Is there any way to get context sensitive help functionality with win32::GUI::*? I want to bind menus to any kind of item on a right click. Specifically I'd like to bind a right click menu to menu items, so i can have an app that had menus, which i can right click. A content sensitive menu should come up, with an edit option, which allows me to edit the perl code that would be executed if I left clicked that item. Another question I have is about RichEdit. I'd like to be able to make a code editor with line numbering and syntax highlighting. For line numbering, I can just draw a box with the numbers next to the rich edit box, but how do I know when they scroll the rich edit box? and I don't have a clue how to go about syntax highlighting.... any ideas? Nick |
From: scott s. <sr_...@ya...> - 2002-08-13 01:18:52
|
Dear Fellow Perl GUI Heads, I am a newbe to Win32::GUI. I followed all the instructions but cant get it to install. The demo's bomb. I really have big plans for this if I can get it to work. Can anyone help me: I installed the latest build: Win32-GUI-0.0.665-PPM.tar.gz on my Windows 2000 and WindowsXP platforms. I am running ActiveState Perl. I performed the install as outlined in the read.me : (i.e. ppm install Win32-GUI.ppd) Everything went okay. I tried the demo (password) on the website and get the same error for all the demos (something like a Prototype mismatch) (See Below) IF ANYONE CAN CAN HELP ME I WOULD SINCERELY APPRECIATE IT !!!! PLEASE REPLY TO SR_...@YA... Error Message Follows: C:\Documents and Settings\Scott\Desktop\TheGUILoft\Demo\Password>password.pl Prototype mismatch: sub main::MB_ICONHAND vs () at C:/Program Files/Perl/lib/Exp orter.pm line 57. Exporter::import('NULL', 'WIN31_CLASS', 'OWNER_SECURITY_INFORMATION', 'G ROUP_SECURITY_INFORMATION', 'DACL_SECURITY_INFORMATION', 'SACL_SECURITY_INFORMAT ION', 'MB_ICONHAND', 'MB_ICONQUESTION', ...) called at C:\Documents and Settings \Scott\Desktop\TheGUILoft\Demo\Password\Password.pl line 28 main::BEGIN() called at C:/Program Files/Perl/site/lib/Win32.pm line 28 eval {...} called at C:/Program Files/Perl/site/lib/Win32.pm line 28 Prototype mismatch: sub main::MB_ICONQUESTION vs () at C:/Program Files/Perl/lib /Exporter.pm line 57. Exporter::import('NULL', 'WIN31_CLASS', 'OWNER_SECURITY_INFORMATION', 'G ROUP_SECURITY_INFORMATION', 'DACL_SECURITY_INFORMATION', 'SACL_SECURITY_INFORMAT ION', 'MB_ICONHAND', 'MB_ICONQUESTION', ...) called at C:\Documents and Settings \Scott\Desktop\TheGUILoft\Demo\Password\Password.pl line 28 main::BEGIN() called at C:/Program Files/Perl/site/lib/Win32.pm line 28 eval {...} called at C:/Program Files/Perl/site/lib/Win32.pm line 28 Prototype mismatch: sub main::MB_ICONEXCLAMATION vs () at C:/Program Files/Perl/ lib/Exporter.pm line 57. Exporter::import('NULL', 'WIN31_CLASS', 'OWNER_SECURITY_INFORMATION', 'G ROUP_SECURITY_INFORMATION', 'DACL_SECURITY_INFORMATION', 'SACL_SECURITY_INFORMAT ION', 'MB_ICONHAND', 'MB_ICONQUESTION', ...) called at C:\Documents and Settings \Scott\Desktop\TheGUILoft\Demo\Password\Password.pl line 28 main::BEGIN() called at C:/Program Files/Perl/site/lib/Win32.pm line 28 eval {...} called at C:/Program Files/Perl/site/lib/Win32.pm line 28 Prototype mismatch: sub main::MB_ICONASTERISK vs () at C:/Program Files/Perl/lib /Exporter.pm line 57. Exporter::import('NULL', 'WIN31_CLASS', 'OWNER_SECURITY_INFORMATION', 'G ROUP_SECURITY_INFORMATION', 'DACL_SECURITY_INFORMATION', 'SACL_SECURITY_INFORMAT ION', 'MB_ICONHAND', 'MB_ICONQUESTION', ...) called at C:\Documents and Settings \Scott\Desktop\TheGUILoft\Demo\Password\Password.pl line 28 main::BEGIN() called at C:/Program Files/Perl/site/lib/Win32.pm line 28 eval {...} called at C:/Program Files/Perl/site/lib/Win32.pm line 28 Prototype mismatch: sub main::MB_ICONWARNING vs () at C:/Program Files/Perl/lib/ Exporter.pm line 57. Exporter::import('NULL', 'WIN31_CLASS', 'OWNER_SECURITY_INFORMATION', 'G ROUP_SECURITY_INFORMATION', 'DACL_SECURITY_INFORMATION', 'SACL_SECURITY_INFORMAT ION', 'MB_ICONHAND', 'MB_ICONQUESTION', ...) called at C:\Documents and Settings \Scott\Desktop\TheGUILoft\Demo\Password\Password.pl line 28 main::BEGIN() called at C:/Program Files/Perl/site/lib/Win32.pm line 28 eval {...} called at C:/Program Files/Perl/site/lib/Win32.pm line 28 Prototype mismatch: sub main::MB_ICONERROR vs () at C:/Program Files/Perl/lib/Ex porter.pm line 57. Exporter::import('NULL', 'WIN31_CLASS', 'OWNER_SECURITY_INFORMATION', 'G ROUP_SECURITY_INFORMATION', 'DACL_SECURITY_INFORMATION', 'SACL_SECURITY_INFORMAT ION', 'MB_ICONHAND', 'MB_ICONQUESTION', ...) called at C:\Documents and Settings \Scott\Desktop\TheGUILoft\Demo\Password\Password.pl line 28 main::BEGIN() called at C:/Program Files/Perl/site/lib/Win32.pm line 28 eval {...} called at C:/Program Files/Perl/site/lib/Win32.pm line 28 Prototype mismatch: sub main::MB_ICONINFORMATION vs () at C:/Program Files/Perl/ lib/Exporter.pm line 57. Exporter::import('NULL', 'WIN31_CLASS', 'OWNER_SECURITY_INFORMATION', 'G ROUP_SECURITY_INFORMATION', 'DACL_SECURITY_INFORMATION', 'SACL_SECURITY_INFORMAT ION', 'MB_ICONHAND', 'MB_ICONQUESTION', ...) called at C:\Documents and Settings \Scott\Desktop\TheGUILoft\Demo\Password\Password.pl line 28 main::BEGIN() called at C:/Program Files/Perl/site/lib/Win32.pm line 28 eval {...} called at C:/Program Files/Perl/site/lib/Win32.pm line 28 Prototype mismatch: sub main::MB_ICONSTOP vs () at C:/Program Files/Perl/lib/Exp orter.pm line 57. Exporter::import('NULL', 'WIN31_CLASS', 'OWNER_SECURITY_INFORMATION', 'G ROUP_SECURITY_INFORMATION', 'DACL_SECURITY_INFORMATION', 'SACL_SECURITY_INFORMAT ION', 'MB_ICONHAND', 'MB_ICONQUESTION', ...) called at C:\Documents and Settings \Scott\Desktop\TheGUILoft\Demo\Password\Password.pl line 28 main::BEGIN() called at C:/Program Files/Perl/site/lib/Win32.pm line 28 eval {...} called at C:/Program Files/Perl/site/lib/Win32.pm line 28 Can't locate Win32/GUI/Loft/Design.pm in @INC (@INC contains: C:/Program Files/P erl/lib C:/Program Files/Perl/site/lib .) at C:\Documents and Settings\Scott\Des ktop\TheGUILoft\Demo\Password\Password.pl line 29. BEGIN failed--compilation aborted at C:\Documents and Settings\Scott\Desktop\The GUILoft\Demo\Password\Password.pl line 29. --------------------------------- Do You Yahoo!? HotJobs, a Yahoo! service - Search Thousands of New Jobs |
From: Alan L. <al...@vd...> - 2002-08-09 20:48:10
|
Hi folks, I'm a newcomer but have already discovered the addictive nature of Win32::GUI. So here's my 2 cents worth. Fonts: Strangely enough, I have found that for the kind of thing you describe you don't need to go into all the font definition stuff, as long as you know how to use ->SetCharFormat() and its main parameters: -name => "aValidFontname", -bold => 0/1, -underline => 0/1, -italic => 0/1, -height => pointsize in latest version, otherwise try 195 for starters, -color => 0xBBGGRR. You can change any of them on the fly, one or more at a time. Hereis something that works for me in a multi-lingual dictionary I use intensively. I have found that it is best to use "old-fashioned" fonts, i.e. those that use only the chars 0 - 255. (e.g. Windows 1251). The RichEdit will happily accept Unicode, but I have yet to find a way to persuade Perl to collect it from the control. I also tend to ask for things in my searching and mangling that Perl probably doesn't support. You will also need to have set up the necessary keyboard layouts for Cyrillic, Central European, whatever. Let's assume you have a standard font that identifies itself as 'Arial' and a Cyrillic font that identifies itself as 'ArialCyr' and - this is certainly important under Win 2000 - that has an OEM charset. I had to change mine with a font editor because otherwise Win 2000 used Arial for anything resembling Arial. There are lots of fonts "out there" that will serve very well - I just happened to want Arial. Now assume you have already defined a RichEdit called $riched, and you want to apply the Cyrillic font to the whole of the contents (before or after puttting something into it). # select everything in the RichEdit - this should cope with a lot of content! $riched->Select(0, 0xFFFFFF); # apply our standard font $riched->SetCharFormat (-name, "Arial"); # now all the text is standard Arial # select everything again $riched->Select(0, 0xFFFFFF); $riched->SetCharFormat (-name, "ArialCyr"); # any western text is still Arial, but any accented characters # now display as Cyrillic. If you switch to a Cyrillic keyboard (I use Russian Typewriter) you can enter Cyrillic text directly. If you put the ->SetCharFormat() stuff (without the ->Select() ) into a button handler, you can also change individual selections by simply selecting on screen and clicking on the button. # e.g assuming you have some text selected sub boldBtn_Click { $riched->SetCharFormat( -bold, 1); (Also, until Aldo 'improved' the event handling, you could subclass the RichEdit to get at the _Keypress event and write a handler to do neat things like using ctrl-B for bold, etc. Would the real Aldo please - pretty please - stand up and write enough of the new documentation to let us know if there is some way to get at all those other juicy events.) Timers: Why not simply create the timer when you need it?. # define a holder my $timer1; later, when you need it, from almost anywhere, even in a sub: # let's have a an 0.1 second timer $timer1 = GUI::Timer->New('tim1', 100); # and a sub to handle it sub tim1_Timer { dosomething() ; } Fed up with it? # bye-bye timer GUI::KillTimer ($timer1); Is anyone out there doing anything about that Win32::GUI 'repository'? I've got some .558 odds and ends that might be of interest, and would like to see what else is around. jeb.ca seems to have gone into hibernation before I ever got there. Regards Alan Lindsey On 9 Aug 2002 at 12:04, per...@li...urce wrote: Send Perl-Win32-GUI-Users mailing list submissions to per...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users or, via email, send a message with subject or body 'help' to per...@li... You can reach the person managing the list at per...@li... When replying, please edit your Subject line so it is more specific than "Re: Contents of Perl-Win32-GUI-Users digest..." Today's Topics: 1. Question about timers and fonts (Christian Kappler) 2. (no subject) (Eric Hansen) --__--__-- Message: 1 From: "Christian Kappler" <uz...@un...> To: "Perl-Win32-GUI Mailinglist" <Per...@li...> Date: Fri, 9 Aug 2002 17:43:36 +0200 Subject: [perl-win32-gui-users] Question about timers and fonts Hi listers, I am not that familiar with windows GUI programming. So my questions might be stupid, but I hope someone could help me with answers... 1. I would like to create a timer that is initially disabled. As I understand the docu for Win32::GUI I have to set the elapse time of the timer to 0 to disable it. So I thought $Window = new Win32::GUI::Window(-name => 'Window',-height => 600, -width => 800); $MyTimer = $Window->AddTimer('MyTimer',0); should create a window with a initially disabled timer and that $MyTimer->Interval(0); would disable it later on. But I found that the timer executed my event subroutine sub MyTimer_Timer {...} very very often instead of being disabled. What am I doing wrong here? How can I (initially) disable a timer? Maybe it has to do with my system? I am using Win32::GUI version 0.0.558 under WinXp Home. 2. I would like to use the font object of Win32::GUI. I will need it to display Western Europe characters as well as other types of characters (like cyrillic). In the docu I found many options for this object, where I do not know what they mean or which values might be valid for them. Here are some of the options from the which I do not understand: -escapement -weight -charset (Okay, this is for character sets. Is their a special notation for this?) -outputprecision -clipprecision -family -quality -name (Has the -name to be equivalent to the name of a font which is installed on the computer?) -face And from the GetMetrics() mehtod: -ascent -descent -ileading -eleading -avgwidth -overhang -aspectx -aspecty -firstchar -lastchar -breakchar -flags Maybe there is somewhere a more detailed documentation about using of fonts which I could read? I am specially interested if -name has to be equivalent to the name of a font installed on my computer and which values are valid for the -charset option? Thanks for all your hints and advice in advanced. Regards, Christian *** Christian Kappler *** --__--__-- Message: 2 From: "Eric Hansen" <sir...@ho...> To: Per...@li... Date: Fri, 09 Aug 2002 11:27:10 -0500 Subject: [perl-win32-gui-users] (no subject) Has anyone written a business application for order entry, inventory management, accounting? I would like to find one written in GUI Perl with source code so I can make any customizations I may need. Thanks!! Eric _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com --__--__-- _______________________________________________ Perl-Win32-GUI-Users mailing list Per...@li... https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users End of Perl-Win32-GUI-Users Digest |