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: Felix G. <fe...@fr...> - 2001-04-14 21:03:26
|
<HTML> <BODY> <h1>The Win32::GUI FAQ</h1> <pre> Aldo Calpini, da...@pe... Erick Bourgeois, er...@je...=20 Felix Gaehler, fe...@fr... v0.1, April 14, 2001 </pre> <p><em>This is the "Frequently Asked Questions" for Perl = Win32::GUI=20 module. The questions and answers have been collected from the = Win32::GUI-Users=20 mailing list. </em>=20 <hr> <p><b>Important Notice: This is a first draft version of the FAQ. The = document=20 is not yet complete and the answers have not yet been = verified.</b></p> <hr> <H1>General Questions</H1> <H2>What is Win32::GUI?</H2> <p>"Win32::GUI is a Win32-platform native graphical user interface = toolkit for=20 Perl. Basically, it's an XS implementation of most of the functions = found in=20 user32.dll and gdi32.dll, with an object oriented Perl interface and = an event-based=20 dialog model that mimic the functionality of visual basic. It was a = big fun=20 for me to put it up, hope it will be a fun for you too :-)"</p> <H2>Where can I get Win32::GUI?</H2> <p>The creator and chief maintainer of the Win32::GUI module is Aldo = Calpini.=20 The module and pertinent information can be found at <a = href=3D"http://dada.perl.it/">http://dada.perl.it/</a>. <br> "The module is actually in beta testing so be warned that syntax and = behavior=20 can change with future builds; and of course, that there are many = incomplete=20 parts, sparse documentation (you can browse here the work in = progress), and=20 generally a lot of things to do." <p>Win32::GUI for ActiveState Perl 5.6 can be downloaded from the = ActiveState=20 Archive using ppm:=20 <pre> ppm install Win32::GUI </pre> <p>Documentation is available at <pre> <a = href=3D"http://dada.perl.it/gui_docs/gui.html">http://dada.perl.it/gui_do= cs/gui.html</a> <a = href=3D"http://www.jeb.ca/howto/The_Win32-GUI_HOWTO.html">http://www.jeb.= ca/howto/The_Win32-GUI_HOWTO.html</a> </pre> <H2>What about licensing?</H2> <p>If I develop a product in Perl with usage of the Win32::GUI module, = and I spread=20 (well lets asume for FREE) to the public.. is it still under GNU = license or=20 do we have to pay the win32::gui team something ?=20 <p> "No, you don't have to pay anything. I'm not a lawyer and I = don't want=20 to pay a lawyer :-) Win32::GUI is released under the Artistic License, = eg. you=20 can redistribute it under the same terms of Perl itself." <hr> <H1>Frequent Problems</H1> <H2>Why does my window seem to freeze when my program is in a loop?</H2> <p>I can help here. Put a call to DoEvents() inside the loop. this will ensure that all queued messages are processed before going on with the loop: <pre> Textfield->change(-text "Processing..."); = $$$verify foreach $line (<INFILE>) { $Window->DoEvents(); # body of the loop... } Textfield->change(-text "completed"); </pre> <p>This will, of course, make your loop run slightly slower (almost = irrelevant=20 if there is no activity on the window). But there is the advantage = (other than=20 having the Textfield saying "Processing...") of being able to stop the = loop=20 in the middle by killing the window, or with a 'dedicated' stopbutton, = for example.=20 <H2>Can I use a window handle in more than one process?</H2> <p>If you run some lengthy processing like web page retrieval with LWP, = database=20 search, file processing etc, and you cannot call = $Window->DoEvents() within=20 that processing, your window will seem to freeze during your = processing. The=20 solution to that is, to do the processing in a separate Windows thread = or process.=20 ActivePerl 5.6 simulates the "fork" command using Windows = threads. <p>"Well, from Windows point of view, it is a thread. From Perl's = point of=20 view, it is a process. The Perl interpreter is busily keeping the data = separate=20 between the two threads (I'm not sure I understand the complete = technique of=20 the magic that does that, but I'm sure it can be made to work because = the Perl=20 language doesn't expose "real" addresses (much))."=20 <p> "On the other hand, the (Unix) model for "fork" is that the = multiple=20 processes (threads on Perl for Windows) start off with identical = data/variables/file=20 handles. And the Windows model for "windows" is that the windows are = owned by=20 a process (not a thread), and can be accessed by any thread that has = the window=20 handle. (And in fact, because Windows was developed on DOS, the = windows are=20 even a bit visible to other processes, but that doesn't concern us = here.)" <p>"By creating the Win32::GUI objects before forking, both the = parent and=20 child threads get copies (?) of the object variables. Because of the = nature=20 of Windows, the embedded Window handles inside both copies of the = object variables=20 are equally usable. Because of the (present) nature of Win32::GUI, = whereby most=20 of the parameter data is pumped into Win32 API parameters, and most of = the return=20 values are obtained by calling Win32 APIs to obtain it, I have shown = experimentally=20 that it is possible to use the Win32::GUI object references from both = a parent=20 and a child thread. Now it is important to remember that Windows only = delivers=20 window messages to the first thread of a program, so in the Perl = "fork" environment,=20 this gets translated to <b>only the parent process of a group of = Perl-forked=20 processes can successfully run Win32::GUI::Dialog</b> (Yep, I tried it = the other=20 way first, figuring that the parent could more easily monitor the = child process=20 for death, since fork returns the child pid, and waitpid works that = way--but=20 it just hung, and the windows never appeared). However, <b>the child = can use=20 the object references created by Win32::GUI</b> [before the fork] to = access=20 the "IsEnabled", "IsVisible" attributes of the window widgets, and = they are=20 dynamically updated (not cached in the object). The child can access = the current=20 selection from combo boxes. The child can enable and disable widgets, = and the=20 display gets updated appropriately. This is quite adequate for my = application,=20 which now can do its "long" operations in the child "process", and = keep the=20 GUI window "active" (except that certain parts get disabled during = "long" operations)." <H2>How can I use Win32::GUI functions in EVAL?</H2> <p>Yes, Win32::GUI supports things like these (it's really Perl that = supports=20 it :-), but you need to escape your window-handler variable $W:=20 <pre> eval qq ( sub main::$subtxt { print "button clicked\n"; <b>\$W</b>->SimpleLabel->Text("Got a click"); } ); $@ or die "Error in eval: $@"; $$$verify </pre> ...and always check for $@ after an eval! <hr> <H1>Text Fields</H1> <H2>How can I change the background color of a text field?</H2> <p>To change the background color of a Richedit field, use</p> <pre> Richedit->SendMessage(EM_SETBKGNDCOLOR, 0, hex('00FF00')); </pre> <p>This sets the background color to green. Note that the hex() format = for the=20 color is expressed as BBGGRR (BB=3Dblue, GG=3Dgreen, RR=3Dred). </p> <p>Textfield does not support EM_SETBKGNDCOLOR. have you tried this: = </p> <pre> # change to red Textfield->Change( -background =3D> [ 255, 0, 0 ] );=20 # repaint the control Textfield->InvalidateRect(1); =20 </pre> <p>Note: Colors can now be given in the HTML notation too (eg. = "#E3E2CC"). <H2>How can I get a vertical scrollbar in a textfield?</H2> Add this option when you create the Textfield: <pre> -autovscroll =3D> 1 </pre> This should do the trick. <H2>How can I get the selected portion of a textfield?</H2> <p>There is a Selection method that returns the start and end of the = selection.=20 then you just make a substr on the Textfield content:=20 <pre> ($from, $to) =3D $Textfield->Selection(); $var =3D substr($Textfield->Text, $from, $to-$from); </pre> <H2>How can I get the _Change event from a RichEdit control?</H2> <p>"I'd like to share a solution to a problem that has been driving = me nuts=20 for a while. I changed a Textfield control to a RichEdit and it would = not give=20 me the _Change event. I dug in the GUI.xs and could find nothing = wrong. I finally=20 tracked it down to the eventmask being zero, which means that the = notification=20 messages don't come to the GUI message loop in the first place. The = workaround=20 is to do=20 <pre> $MainWindow->myRichEditField->SendMessage (0x445, 0, 1); </pre> <p>That sends EM_SETEVENTMASK (0x445) to the control with the ENM_CHANGE = bit set.=20 Hope that spares somebody else a headache." <hr> <H1>ListView</H1> <H2> How can I prevent the user from choosing more than one item in a = Listview?</H2> You can use the -singlesel option on the ListView to achieve what you = want. <H2>How can I display a popup menu within a ListView?</H2> <p>Here is an example how it can be done: <pre> # define popup menu for listview my $PopupMenu =3D new Win32::GUI::Menu( "Item Properties" =3D> "ItemProp", ">&Properties" =3D> "ItemProperties", ); =20 # get right-click in listview sub DataView_RightClick { my($X, $Y) =3D Win32::GUI::GetCursorPos(); =20 $MainWindow->TrackPopupMenu($PopupMenu->{ItemProp},$X, $Y); } =20 # clicked on particular menu item in popup menu sub ItemProperties_Click { ## code you want to process; } </pre> <hr> <H1>MessageBox</H1> <H2>What are the icon, button and modality values for MessageBox?</H2> <p>"I think these will work, I haven't tried them all.=20 <pre> Settings =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D 0 - display only the OK button 1 - display OK and Cancel buttons 2 - display Abort, Retry, and Ignore buttons 3 - display Yes, No, and Cancel buttons 4 - display Yes and No buttons 5 - display Retry and Cancel buttons 16 - display Critical Message icon 32 - display Warning Query icon 48 - display Warning Message icon 64 - display Information Message icon 0 - set first button as default 256 - set second button as default 512 - set third button as default 768 - set fourth button as default =20 Return Values =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 1 - OK 2 - Cancel 3 - Abort 4 - Retry 5 - Ignore 6 - Yes 7 - No" </pre> <H1>Cursors</H1> <H2>How can I change the cursor to hourglass and back?</H2> <p>$$$tbd (find out first...) <hr> <H1>Extensions to Win32::GUI</H1> <H2>Is there a spreadsheet (grid) look-a-like solution or = component?</H2> <p>"No, but I'm thinking about implementing one (just thinking for = now :-).=20 " <H2>Is there a inline webbrowser somewhere ? or a HTML or XML = parser?</H2> "No, and I don't think I will try to implement one :-) You should = instead=20 look at Win32::OLE, to see if you can embed an InternetExplorer instance = in a=20 window. That said, it seems that RichEdit 3.0 (available in Windows = 2000) has=20 a lot of nice features, that I'll try to implement if time = permits."=20 <H2>Is there support for JPG or common image formats like .PNG or = .GIF?</H2> <p>"Support is for .BMP files only. There is something in the Win32 = API about=20 JPGs, but I have not yet investigated it thoroughly."=20 <p>$$$How to convert JPG and GIF to BMP in Perl (tbd) <H2>Is there a Win32-GUI-Builder available (i.e. a visual aid in = designing the GUI)?</H2> <p>yes, well.. at least a basic one. Download <pre> <a = href=3D"ftp://ftp.wh.whoi.edu/pub/gb109.zip">ftp://ftp.wh.whoi.edu/pub/gb= 109.zip</a> </pre> For more information, see in the Win32::GUI mailing-list, the mails from = David Hiltz. <H2>How can I deal with moving and resizing stuff when a window is = resized?</H2> <p>"Dealing with moving and resizing stuff when a window is resized = is really=20 annoying, not to mention boring. So I created a class to make that = easier. That=20 was a lot more fun for some reason :) Anyway, the result is = Win32::GUI::Resizer.=20 <pre> <a = href=3D"http://www.bahnhof.se/~johanl/perl/Win32GUI/">http://www.bahnhof.= se/~johanl/perl/Win32GUI/</a> </pre> Please try it out if you like and let me know what you think. "=20 <p>$$$Source: mail from Johan Lindstr=F6m, Sourcerer, Boss Casinos Ltd, = Antigua,=20 jp...@bo...=20 <hr> </BODY></HTML> |
From: Peopleclick C. S. <Peo...@pe...> - 2001-04-12 16:48:43
|
Just as an fyi, most products use the registry for this. If you open regedit and search for MRU, you will find the general structure most apps use in the registry for this. Technically, all you really need to do is to create a new hive for your product under hklm\software\yourcompanyorappname\MRU\ and then have each file as a separate value. Most companies use the HKU hive, but it requires more effort on your part to get the username and resolve that to subhive of HKU. Either way you want to go, unless there are some VERY tight security, the registry is the "proper" way to store this sort of thing instead of a file. =20 Joe Frazier, Jr Technical Support Engineer Peopleclick.com 800-841-2365 su...@pe... > -----Original Message----- > From: Peter Eisengrein [mailto:Pet...@at...] > Sent: Thursday, April 12, 2001 8:46 AM > To: 'per...@li...' > Subject: RE: [perl-win32-gui-users] Most-Recently-Used files >=20 >=20 > I'd simply write the path\file to a data file somewhere and=20 > read it before > you contruct your menu. You would write to this file every=20 > time someone > opens or creates a file. You would probably also want to=20 > create a subroutine > that limits how many files are kept, as such: >=20 > ### untested! >=20 > ### At the beginning of the script this sub would get called like > &recentFilenames(); >=20 >=20 > ### during your open file sub do something like this. $file =3D=20 > the file you > just opened=20 > &recentFilenames(open,$file); >=20 >=20 > ### > sub recentFilenames > { > my ($what,$file) =3D @_; > if ($what eq "open") > { > open(FILE,">>$recentFiles"); > print FILE "$file\n"; > close(FILE); > push(@recentFiles,$file); > shift(@recentFiles); > } > else > { > open(FILE,"$recentFiles"); > @recentFiles=3D<FILE>; > close(FILE); >=20 > $count=3D@recentFiles; > while ($count > "5") ### however many files=20 > you want to > remember. > { > shift(@recentFiles); > } >=20 > } >=20 >=20 > ### do your menu here, using @recentFiles >=20 > } >=20 >=20 > =09 >=20 > -----Original Message----- > From: A [mailto:pri...@se...] > Sent: Wednesday, April 11, 2001 3:30 PM > To: per...@li... > Subject: [perl-win32-gui-users] Most-Recently-Used files >=20 >=20 > Hi, > Does anybody have an idea how to implement a Most-Recently- > Used files (last used files)? > It is mostly in File menu. > I mean similar to MS WORD, MS EXCEL, COREL and many other=20 > applications. > Thanks >=20 > Ladislav >=20 >=20 >=20 > ------- End of forwarded message ------- >=20 > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users >=20 > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users >=20 |
From: Peter E. <Pet...@at...> - 2001-04-12 15:29:59
|
Took a peek at podview.pl. Instead of a datafile it uses the registry. It also uses a hash instead of an array, so duplicates don't exist (if you open the same file multiple times). Good call, this is a better way to handle it, assuming the person using it is careful with the registry. -----Original Message----- From: se...@la... [mailto:se...@la...] Sent: Thursday, April 12, 2001 9:20 AM To: per...@li... Subject: RE: [perl-win32-gui-users] Most-Recently-Used files Look in podview.pl, in the samples directory that comes with the zip file, for code that implements such a menu. (Although I've never used this code, I noticed the feature when I was looking through the samples.) If you got Win32::GUI by PPM from ActiveState, you probably don't have this directory. I highly recommend getting the zip file just for this directory, even if you are not going to build Win32::GUI yourself. > I'd simply write the path\file to a data file somewhere and read it > before you contruct your menu. You would write to this file every time > someone opens or creates a file. You would probably also want to > create a subroutine that limits how many files are kept, as such: _______________________________________________ Perl-Win32-GUI-Users mailing list Per...@li... http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users |
From: <se...@la...> - 2001-04-12 13:21:29
|
Look in podview.pl, in the samples directory that comes with the zip file, for code that implements such a menu. (Although I've never used this code, I noticed the feature when I was looking through the samples.) If you got Win32::GUI by PPM from ActiveState, you probably don't have this directory. I highly recommend getting the zip file just for this directory, even if you are not going to build Win32::GUI yourself. > I'd simply write the path\file to a data file somewhere and read it > before you contruct your menu. You would write to this file every time > someone opens or creates a file. You would probably also want to > create a subroutine that limits how many files are kept, as such: |
From: Peter E. <Pet...@at...> - 2001-04-12 12:45:53
|
I'd simply write the path\file to a data file somewhere and read it before you contruct your menu. You would write to this file every time someone opens or creates a file. You would probably also want to create a subroutine that limits how many files are kept, as such: ### untested! ### At the beginning of the script this sub would get called like &recentFilenames(); ### during your open file sub do something like this. $file = the file you just opened &recentFilenames(open,$file); ### sub recentFilenames { my ($what,$file) = @_; if ($what eq "open") { open(FILE,">>$recentFiles"); print FILE "$file\n"; close(FILE); push(@recentFiles,$file); shift(@recentFiles); } else { open(FILE,"$recentFiles"); @recentFiles=<FILE>; close(FILE); $count=@recentFiles; while ($count > "5") ### however many files you want to remember. { shift(@recentFiles); } } ### do your menu here, using @recentFiles } -----Original Message----- From: A [mailto:pri...@se...] Sent: Wednesday, April 11, 2001 3:30 PM To: per...@li... Subject: [perl-win32-gui-users] Most-Recently-Used files Hi, Does anybody have an idea how to implement a Most-Recently- Used files (last used files)? It is mostly in File menu. I mean similar to MS WORD, MS EXCEL, COREL and many other applications. Thanks Ladislav ------- End of forwarded message ------- _______________________________________________ Perl-Win32-GUI-Users mailing list Per...@li... http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users |
From: A <pri...@se...> - 2001-04-11 19:28:11
|
Hi, Does anybody have an idea how to implement a Most-Recently- Used files (last used files)? It is mostly in File menu. I mean similar to MS WORD, MS EXCEL, COREL and many other applications. Thanks Ladislav ------- End of forwarded message ------- |
From: Piske, H. <Har...@bo...> - 2001-04-10 22:39:00
|
Hi This was posted before, but no one ever came up with a solution. A workaround would be: 1) use a RichEdit instead of the Textfield 2) since the -readonly (or ES_READONLY) does not work as expected, do the $LogWindow->AddRichEdit() without it and then go $LogWindow->LogText->SendMessage(0xCF, 1, 0); Have fun Harald References: Message: 5310692 FROM: Glenn Linderman DATE: 03/09/2001 08:54:51 SUBJECT: [perl-win32-gui-users] Bug in Textfield scrolling Message: 5302185 FROM: Aldo Calpini DATE: 03/08/2001 07:00:02 SUBJECT: RE: [perl-win32-gui-users] Re: how to set ? | -----Original Message----- | From: Webmaster CZ [mailto:web...@cy...] | Sent: Tuesday, April 10, 2001 11:50 | To: per...@li... | Subject: [perl-win32-gui-users] Bug with -readonly | | | Hi ! | | (Sorry for the bad english...) | | If i write for example .... | | #################### | $LogText = $LogWindow->AddTextfield( | -name => "LogText", | -left => 1, | -top => 1, | -width => 280, | -height => 80, | -font => $LogFont, | -background => "#FFFFFF", | -foreground => "#009900", | -style => WS_VISIBLE | WS_VSCROLL | ES_AUTOVSCROLL | ES_MULTILINE | | ES_READONLY, | ); | ################### | | .... and have many text that i can scroll .... yeahh: then the text is | "mapped over" (i don't now how | i can it write...) !!! | but ONLY if the a) -readonly OR b) ES_READONLY is activ..... | | | _______________________________________________ | Perl-Win32-GUI-Users mailing list | Per...@li... | http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users | |
From: Webmaster C. <web...@cy...> - 2001-04-10 19:33:02
|
Hi ! (Sorry for the bad english...) If i write for example .... #################### $LogText = $LogWindow->AddTextfield( -name => "LogText", -left => 1, -top => 1, -width => 280, -height => 80, -font => $LogFont, -background => "#FFFFFF", -foreground => "#009900", -style => WS_VISIBLE | WS_VSCROLL | ES_AUTOVSCROLL | ES_MULTILINE | ES_READONLY, ); ################### .... and have many text that i can scroll .... yeahh: then the text is "mapped over" (i don't now how i can it write...) !!! but ONLY if the a) -readonly OR b) ES_READONLY is activ..... |
From: <se...@la...> - 2001-04-09 11:55:46
|
I know I saw this on this list just a while ago, but when I went to the mailing list archive, the search found no results for "radiobutton". (Indeed, the search found no result for "Win32::GUI", either, so I suspect the problem may be the search script itself.) Anyway, how do you make separate radiobutton groups. I thought I remembered the answer being -group => 'groupname', in the attributes for the first radiobutton of each group, but that's not working for me. (Sorry for reasking a question so recently posted, but the mailing list archive search doesn't work.) |
From: Piske, H. <Har...@bo...> - 2001-04-08 17:54:27
|
What you need is sub Combo_Anonymous { $ComboText = $Main->Combo->Text () if $_[0] == 6; } The way it is coded in GUI.xs, Perl fires the _Change event for CBN_SELCHANGE and the _Anonymous event for all other notification messages. You can pick either CBN_EDITCHANGE (5) or CBN_EDITUPDATE (6) to catch the new text. Note you will get this event whenever "the user has taken an action that may have altered the text in the edit control" - says MSDN. So, you may not want to have a lengthy action going on inside the _Anonymous sub. Note that, in the _Change event, $Main->Combo->Text() still shows the contents of the edit control before it is replaced by the selected line from the listbox. You need to do sub Combo_Change { $ComboText = $Main->Combo->GetString($Main->Combo->SelectedItem()); } to have your variable reflect the current contents. Hope that helps. Have fun Harald -----Original Message----- From: se...@la... To: per...@li... Sent: 07.04.01 19:29 Subject: [perl-win32-gui-users] Combobox/Textfield I've seen some programs that have a combination Combobox/Textfield. So you can either enter text or choose text from the dropdown box. When I tried to do this with Win32::GUI, I can type in that space, but the program doesn't catch it, and instead gives me whatever was selected last. What I want to do is take whatever text the user enters and add it to the Combobox, storing the ten (or so) last strings, so that if they want to reenter some text they had previously entered, they won't have to retype it. I could have a Combobox below the Textfield, but it looks better to have just one control there. Any suggestions? _______________________________________________ Perl-Win32-GUI-Users mailing list Per...@li... http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users |
From: <se...@la...> - 2001-04-08 02:31:16
|
I've seen some programs that have a combination Combobox/Textfield. So you can either enter text or choose text from the dropdown box. When I tried to do this with Win32::GUI, I can type in that space, but the program doesn't catch it, and instead gives me whatever was selected last. What I want to do is take whatever text the user enters and add it to the Combobox, storing the ten (or so) last strings, so that if they want to reenter some text they had previously entered, they won't have to retype it. I could have a Combobox below the Textfield, but it looks better to have just one control there. Any suggestions? |
From: Piske, H. <Har...@bo...> - 2001-04-07 17:07:54
|
>This message was sent from Geocrawler.com by "Carol" > >I have tried to do thie but get the following >error: > >Can't locate auto/Win32/GUI/DoEvents.al in @INC > >when trying to use: > >Win32::GUI::DoEvents(); > >??? > >Any idears? Actually, yes. My guess is you ran into an old version of Win32-GUI that has a bad version number, making it look newer than the current one, so that the installer will not replace it. In a DOS window, do ppm query and look for the line with Win32-GUI. It should read 0.0.558 in the version number. If it's 0.99, that's the bad one. Go ppm remove Win32-GUI ppm install Win32-GUI that should re-install the (now updated) version from ActiveState. You need to have an open internet connection for that. If it does not work, download Win32-GUI-0.0.558.tar.gz from http://dada.perl.it/#gui, unzip it somewhere and do ppm install Win32-GUI.ppd from that directory. Reconfirm with ppm query that you now have the current version 0.0.558. Have fun Harald |
From: Carolyyne C. <car...@ho...> - 2001-04-07 16:51:42
|
I get the following error: Can't locate auto/Win32/GUI/DoEvents.al in @INC when using: $abort = Win32::GUI::DoEvents(); Help!! Thanks, This is what I'm trying to do - is there a better way? ### use Win32::GUI; use strict; my $M = new Win32::GUI::Menu( "&File" => "File", " > &Stop" => "stop", " > -" => 0, " > &Go" => "go", ); my $W = new Win32::GUI::Window( -name => "W", -text => "Stop go", -left => 100, -top => 100, -width => 400, -height => 300, -menu => $M, ); $W->AddLabel( -text => "you can stop the process anytime you want, I hope!", -name => "event", -left => 50, -top => 50, ); ## $W->Show(); Win32::GUI::Dialog(); ## sub W_Terminate { -1; } sub go_Click { $W->event->Text("now running"); &run; } sub stop_Click { $W->event->Text("now stopped"); } sub run { my $c = 1; $W->event->Text("$c in sub program, sleeping "); sleep 3; #could I check for user interaction now and exit the sub routine if required? #$abort = Win32::GUI::DoEvents() --> returns an error .. $c++; $W->event->Text("$c in sub program, sleeping "); sleep 3; #could I check for user interaction now and exit the sub routine if required? #$abort = Win32::GUI::DoEvents() --> returns an error .. $c++; $W->event->Text("$c in sub program, sleeping "); sleep 3; $W->event->Text("Done, returning control!"); } _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. |
From: Carolyyne C. <car...@ho...> - 2001-04-07 16:18:15
|
I get the following error: Can't locate auto/Win32/GUI/DoEvents.al in @INC when using: $abort = Win32::GUI::DoEvents(); Help!! Thanks, This is what I'm trying to do - is there a better way? ### use Win32::GUI; use strict; my $M = new Win32::GUI::Menu( "&File" => "File", " > &Stop" => "stop", " > -" => 0, " > &Go" => "go", ); my $W = new Win32::GUI::Window( -name => "W", -text => "Stop go", -left => 100, -top => 100, -width => 400, -height => 300, -menu => $M, ); $W->AddLabel( -text => "you can stop the process anytime you want, I hope!", -name => "event", -left => 50, -top => 50, ); ## $W->Show(); Win32::GUI::Dialog(); ## sub W_Terminate { -1; } sub go_Click { $W->event->Text("now running"); &run; } sub stop_Click { $W->event->Text("now stopped"); } sub run { my $c = 1; $W->event->Text("$c in sub program, sleeping "); sleep 3; #could I check for user interaction now and exit the sub routine if required? #$abort = Win32::GUI::DoEvents() --> returns an error .. $c++; $W->event->Text("$c in sub program, sleeping "); sleep 3; #could I check for user interaction now and exit the sub routine if required? #$abort = Win32::GUI::DoEvents() --> returns an error .. $c++; $W->event->Text("$c in sub program, sleeping "); sleep 3; $W->event->Text("Done, returning control!"); } _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. |
From: Erick <er...@je...> - 2001-04-07 00:03:00
|
Yahoo, I figured it out!!! I did indeed need the global variable $abort, but another problem crept in. Long and the short of it is that when you abort a transfer, the socket gets closed at the same time, and after my loop I had a $sock->close(). My application froze here (I will investigate further why, I have an idea though), but I just needed to add $sock->close() if (!$abort); This actually helps tremendously, because, now you can have 5 queued transfers and abort one without affecting any others, that's great!! I can feel the brain coming back to normal... :) Thanks Herald, erick never stop questioning www.jeb.ca |
From: Erick <er...@je...> - 2001-04-06 22:01:14
|
Harald, | If the Abort routine intervenes and invalidates $data, | the next read finds an invalid pointer or, worse, a pointer to an invalid | buffer. That's the key thing. How to stop the routine from reading data once and for all. Even when I close the connection between the two handles it continues to read. | If this theory is correct, then there is really no other way than to | move the $data->abort() in the thread that reads from the socket, so that | these two commands can never execute concurrently. Maybe you are a bit confused. There are two abort routines. One fired by the button being pressed and the other to close the socket. Here is the loop that reads and writes the data from the socket. # Open a socket for retrieval # $data = $sock->retr($RemoteFile); while(1) { Win32::GUI::DoEvents(); last unless $len = $data->read($buffer,$blksize); my $written = syswrite(FILE, $buffer, $len); unless(defined($written) && $written == $len) { Msg_Box("Cannot write to local file $LocalFile: $!",48,"Can't Write To File"); $data->abort; close(FILE); return undef; } } Then I have a window which displays the progress with an "Abort" button, which I already gave the code. I need to exit this loop once and for all, once the connection has been closed. The answer is there...just gotta find it...someone...anyone. regards, erick never stop questioning www.jeb.ca |
From: Piske, H. <Har...@bo...> - 2001-04-06 21:46:08
|
| -----Original Message----- | From: Morbus Iff [mailto:mo...@di...] | | Ok. I have no clue what I'm talking about. Welcome to the club ;-) | to a friend, who has done VB stuff in the past, but nothing | with Perl GUI's. Takes some getting used to. Goes for both VB and Win32-GUI. Transitioning from one to the other can bring you close to serious brain damage because you forget to consider the different philosophies. Pretty much like changing from a car to a motorbike. You'll be amazed how fast and easy it is, but you wonder how to get your groceries home. | I was able to tell the webserver to non-block, in other | words, to listen | for a request for 1 second and move on. What I'd like to have | happen is | that when the webserver moves on, the GUI window listens for | events for a | second, and then moves on as well. So, there'd be a 1 second | time share | between the webserver listening and the GUI window listening. | | Is this possible? And how? Yes. I suggest you (and/or your friend) first go through the tutorial and Erick's wonderful collection of basic info @ http://www.jeb.ca/howto/The_Win32-GUI_HOWTO.html Once you know how (and how easy) to design a GUI, just do so. After Show()ing the window, when you usually give it full control using Win32::GUI::Dialog(), you just start your console program. And whenever this thing can spare a time slice (after the 1-second-listen), you do $abort = Win32::GUI::DoEvents(); which will make your GUI do what it wants to do, firing all pending events / messages. This call returns asap, ie when no more messages are in the queue. Now all that's left is exit your program if $abort < 0, and maybe one or two more interactions with the GUI, like evaluating user preferences from checkboxes and writing to textfields instead of printing to the console. And, again: FORGET WHAT YOU KNOW ABOUT VB. Doesn't help here. Basic knowledge about windows, controls, messages, methods, etc is OK, but that's it. Have fun Harald |
From: Morbus I. <mo...@di...> - 2001-04-06 21:06:20
|
Ok. I have no clue what I'm talking about. I created AmphetaDesk: http://www.disobey.com/amphetadesk/ Roughly, it includes a built in webserver that listens until "quittin' time" for requests on port 8888. It writes out logging information to STDOUT, which makes a pretty console window. Ok. What I want to do is make a GUI application using Win32::GUI. Since I know crap about coding a GUI (only about designing one), I handed this off to a friend, who has done VB stuff in the past, but nothing with Perl GUI's. The problem we're running into is something concerning the Window Events. My friend tells me that the Window needs to listen all the time so that it can know when to redraw the window, and blah blah blah. Lemme recap. The program starts a webserver. The program does some junk, and spits to console window. The program loads the browser. 90% of the GUI is done through the browser. While the user fiddles, the program spits info to the console window. The user quits. Ultimately, every where it says "console window", I'd like to replace with a GUI. But we run into the problem of the webserver listening for requests constantly, as well as the window listening to events constantly. I was able to tell the webserver to non-block, in other words, to listen for a request for 1 second and move on. What I'd like to have happen is that when the webserver moves on, the GUI window listens for events for a second, and then moves on as well. So, there'd be a 1 second time share between the webserver listening and the GUI window listening. Is this possible? And how? I'd like to: a) not fork b) be an all perl solution (ignoring the XS lib.) I've got a Mac GUI working in my dev machine, but am running pathetically short on the Windows GUI. Help?! Morbus Iff .sig on other machine. http://www.disobey.com/ http://www.gamegrene.com/ |
From: Piske, H. <Har...@bo...> - 2001-04-06 16:15:33
|
| The problem I believe is because since my application is GUI | and event driven(OOP), any | action one place jumps you to another section of code, | without knowing how to get back and | say, "hey stop doing that, move on". Does this make sense? I guess you're right, it is about multitasking. Reading from the socket places an asynchronous request somewhere. As data comes in, it gets stored in an input buffer. If the Abort routine intervenes and invalidates $data, the next read finds an invalid pointer or, worse, a pointer to an invalid buffer. If this theory is correct, then there is really no other way than to move the $data->abort() in the thread that reads from the socket, so that these two commands can never execute concurrently. If anyone knows more about the internal operations of the sockets driver, please stop me from making these wild assumptions ... :-) Have fun Harald |
From: Erick <er...@je...> - 2001-04-06 11:06:28
|
Harald said: | 1) instead of close, move the file pointer to eof | seek FILE, 0, 2; | so that the read fails without dying This can't be, because the reading is from a socket not a file. I'm reading from a socket and writting to a file (in blocks of 10240 bytes). The read does stop when I abort. This method would certainly be good if I was reading from one file and ouptting to another. | or 2) just set a flag in the abort routine and if the reading routine finds | the flag set, it peacefully quits. The abort routine is not my method, furthermore it does not take any arguments, it just closes the socket and thus all data transfering. The problem I believe is because since my application is GUI and event driven(OOP), any action one place jumps you to another section of code, without knowing how to get back and say, "hey stop doing that, move on". Does this make sense? erick never stop questioning www.jeb.ca | Hi Erick, | | 1) instead of close, move the file pointer to eof | seek FILE, 0, 2; | so that the read fails without dying | | or 2) just set a flag in the abort routine and if the reading routine finds | the flag set, it peacefully quits. | | Hope that helps | Harald | | -----Original Message----- | From: Erick J. Bourgeois | To: per...@li... | Sent: 03.04.01 17:04 | Subject: [perl-win32-gui-users] Aborting a buffered write | | I have a process running, which is writting to a file(using print | instead of syswrite), | and I have a small dialogbox with a progressbar and an abort button. The | problem is when I | click the abort button, I get a GUI message "select: Bad file descriptor | at ... line 412". | This is the line where I read the data in, however, the event for the | Abort button closes | the data stream and the file I'm writting to. Plus the title for the | window error is a | subroutine which was a far ancestor to where it says the error is. This | is what the | Abort_Click looks like. | | sub Abort_Click { | close(FILE); | $data->abort(); | $ProgWin->Hide(); # <--progress dialogbox window | $MainWin->SetForegroundWindow(); | $MainWin->BringWindowToTop(); | GUI::Update($MainWin); | } | | I need a way tell the subroutine that is showing the progress to stop | reading data and | move on. Any ideas? | | erick | never stop questioning | www.jeb.ca | | | _______________________________________________ | Perl-Win32-GUI-Users mailing list | Per...@li... | http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users | |
From: Piske, H. <Har...@bo...> - 2001-04-06 06:14:43
|
Hi folks, I'd like to share a solution to a problem that has been driving me nuts for a while. I changed a Textfield control to a RichEdit and it would not give me the _Change event. I dug in the GUI.xs and could find nothing wrong. I finally tracked it down to the eventmask being zero, which means that the notification messages don't come to the GUI message loop in the first place. The workaround is to do $MainWindow->myRichEditField->SendMessage (0x445, 0, 1); that sends EM_SETEVENTMASK (0x445) to the control with the ENM_CHANGE bit set. Hope that spares somebody else a headache. Have fun Harald |
From: Danny Z. <da...@be...> - 2001-04-05 21:50:02
|
Dear perl-win32-gui-users, is there already any module for printing out graphical data.. i'm trying to make a little catalog, and to print it out via win32::gui .. but i can't find a solid solution i'm NOT willing to export data to PDF or HTML and afterwards print it. I thought of a solution whereby you could preformat your text & images, and than output it to the printer spool. Although i have no idea to realize it :) I'm basing myself on the system that is being used by Waty Tierry is using in VB 5 or 6. Could we maybe port this to perl win32::gui or make use of his system ? as reference; the adress of the printpreview OCX.. http://www.vbdiamond.com/Products/PrintPreview/PrintPreview.asp If you have any questions, whatsoever, please feel free to contact us. Best regards, Danny Zak mailto:da...@be... co-ceo Euro-Pictures/belGOnet.com Princesse Elisabeth Square 9/11 1030 Brussels Belgium Tel : +32-(0)2-215.67.65 Fax : +32-(0)2-215.66.65 |
From: Johan L. <jp...@bo...> - 2001-04-05 13:56:43
|
Dealing with moving and resizing stuff when a window is resized is really annoying, not to mention boring. So I created a class to make that easier. That was a lot more fun for some reason :) Anyway, the result is Win32::GUI::Resizer. http://www.bahnhof.se/~johanl/perl/Win32GUI/ Please try it out if you like and let me know what you think. /J -- Johan Lindström, Sourcerer, Boss Casinos Ltd, Antigua jp...@bo... |
From: Ludvig af K. <kli...@ho...> - 2001-04-04 19:27:03
|
Does anybody have a newer version of the script makeGUIperl.pl that Jenda wrote before getting thrown into the army? The version I have found uses the deprecated module Win32::Registry and doesnt work. Of course I could rewrite it for TieRegistry myself, but first I wanted to check if anybody else had done it =) -Ludde |
From: Piske, H. <Har...@bo...> - 2001-04-04 16:16:32
|
| >time returns back to my program.The window created by my | >program is | >not refreshed immediately to the state before switching but I must | >wait until my program writes to that window. | | The Window class has the Activate() event. Maybe some other | control has | something similar that you can use. Otherwise maybe the Timer | control can | help you, but that might ivolve performance issues. Time | things and find out. Ladislav, we had this posting twice before. Maybe my reply escaped you - or maybe what I suggested didn't work. But from my understanding, the window can only refresh when the respective, system-generated Paint messages get processed. As long as one of your event handlers is running and does not return, the messages just sit there and wait. If this is the cause of the problem, the Activate sub won't help, because the Activate message, too, would not get processed. If you haven't already, put Win32::GUI::DoEvents (); in the sub that runs so long, at a place inside the loop, so that it gets called often. It does not do anything if there are no messages waiting, so I guess it's not much of a performance issue. As for your other question - how to let the user know the program's still alive - that's what progress bars do a good job at. Or a textfield with a counter. If, as you say, the window refreshes as soon as you write to your log field, then writing a countdown might solve both issues. Hope that helps, Harald |