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: Chris E. <ce...@mi...> - 2001-05-11 13:26:46
|
yes.=20 Here is the code. It's messy, but commented ... use Win32::GUI; #($DOS) =3D Win32::GUI::GetPerlWindow(); # Win32::GUI::Hide($DOS); # this is basically a test to learn Win32::GUI my $Toolbar=3DWin32::GUI::Window->new( -name=3D>'Toolbar', -size=3D>[600,75], -title=3D>"PERL ToolBar", ); # launcher button on main bar my $launcher=3D$Toolbar->AddButton( -name=3D>'launcher', -pos=3D>[10,10], -text=3D>"Launcher", ); $Toolbar->launcher->Show(); #launch the launcher panel and create panel as separate window #this is where I can type a command in and run it directly from <STDIN> sub launcher_Click{ my $Launcher=3DWin32::GUI::Window->new(=20 -name=3D>'CommandLauncher', -size=3D>[200,75], -title=3D>"Launcher", ); $Launcher->Show(); my $textfield=3D$Launcher->AddTextfield( -name=3D>'CommandBox', -background=3D>[255,255,0], -pos=3D>[10,10], -size=3D>[150,22], ); #run button on launcher window my $runButton-$Launcher->AddButton( -name=3D>'runbutton', -pos=3D>[160,10], -text=3D>'Run', -size=3D>[30,22], ); $Launcher->runbutton->Show(); # this executes the user input of $textfield=20 sub runbutton_Click{ exec($textfield->Text); } } my $NotePadButton=3D$Toolbar->AddButton( -name=3D>'notepad', -pos=3D>[75,10], -text=3D>'notepad', ); =20 $Toolbar->notepad->Show(); sub notepad_Click{ exec("notepad.exe"); } #exit the program. This is a test to figure out how to keep the=20 #toolbar floating without exiting on button_Click.=20 my $ExitButton=3D$Toolbar->AddButton( -name=3D>'Exit', -pos=3D>[150,10], -text=3D>'Exit Toolbar', ); =20 sub Exit_Click { exit; } =20 $Toolbar->Show(); Win32::GUI::Dialog(); # commented this out trying to troubleshoot=20 # sub Toolbar_Terminate{ # -1; # } =20 ----- Original Message -----=20 From: Peter Eisengrein=20 To: 'per...@li...'=20 Sent: Friday, May 11, 2001 7:31 AM Subject: RE: [perl-win32-gui-users] keeping a window open Do you have the Win::GUI::Dialog(); statement in there? =20 =20 -----Original Message----- From: Chris Etzel [mailto:ce...@mi...] Sent: Thursday, May 10, 2001 8:03 PM To: per...@li... Subject: [perl-win32-gui-users] keeping a window open Ok, it may be that I have hacking at my script so long I am = cross-eyed, but it is too much fun to stop now. I figured the best way = to learn the Win32::GUI was to write a cool little toolbar with a couple = of my most used apps on it. It floats and brings up my apps like it = should, but it closes after I click the button for the app. How do I = keep the script open until I exit it manually?=20 I have an exit button but for the life of me I can't figure out how = to tell it=20 unless I click EXIT, stay open. I will kick myself in advance in case this is a basic perl coding = issue and not a Win32gui issue. Thanks,=20 Chris |
From: Johan L. <jp...@bo...> - 2001-05-11 13:11:22
|
Hirosi Taguti wrote: >I've just tried. > >The demo program in the POD printed, >"Initial state : accepts drops: 0", >and memory vioration occured, says, >pgm 0x01d61c6a accessed 0x00000000, cann't become as read... That's weird. I just call the DragAcceptFiles() function to tell the window that it's able to accept drops. That far in the program the GUI.xs patch isn't used, so that shouldn't have anything to do with it. Maybe I didn't prototype the API call correctly or something. I'll look into this today or during the weekend. /J -- Johan Lindström, Sourcerer, Boss Casinos Ltd, Antigua jp...@bo... |
From: Johan L. <jp...@bo...> - 2001-05-11 13:06:42
|
Chris wrote: >Ok, it may be that I have hacking at my script so long I am cross-eyed, >but it is too much fun to stop now. I figured the best way to learn the >Win32::GUI was to write a cool little toolbar with a couple of my most >used apps on it. It floats and brings up my apps like it should, but it >closes after I click the button for the app. How do I keep the script open >until I exit it manually? 1. In the yourButton_Click() event handler, do you return -1? Return 1 instead. 2. When you start your program, what command do you use? If you use exec(), it won't return. 3. As previously mentioned, putting a few print statements in your code isn't all that bad if you want to see the program flow. BTW, if you really want a floating toolbar, check out the Win32::GUI::ToolbarWindow module in the Oasis source. It will create such a window for you (small titlebar and non-visible in the task bar. You can also apply -topmost on it). /J -- Johan Lindström, Sourcerer, Boss Casinos Ltd, Antigua jp...@bo... |
From: Peter E. <Pet...@at...> - 2001-05-11 12:31:11
|
Do you have the Win::GUI::Dialog(); statement in there? -----Original Message----- From: Chris Etzel [mailto:ce...@mi...] Sent: Thursday, May 10, 2001 8:03 PM To: per...@li... Subject: [perl-win32-gui-users] keeping a window open Ok, it may be that I have hacking at my script so long I am cross-eyed, but it is too much fun to stop now. I figured the best way to learn the Win32::GUI was to write a cool little toolbar with a couple of my most used apps on it. It floats and brings up my apps like it should, but it closes after I click the button for the app. How do I keep the script open until I exit it manually? I have an exit button but for the life of me I can't figure out how to tell it unless I click EXIT, stay open. I will kick myself in advance in case this is a basic perl coding issue and not a Win32gui issue. Thanks, Chris |
From: Chris E. <ce...@mi...> - 2001-05-11 11:51:37
|
Ok, it may be that I have hacking at my script so long I am cross-eyed, = but it is too much fun to stop now. I figured the best way to learn the = Win32::GUI was to write a cool little toolbar with a couple of my most = used apps on it. It floats and brings up my apps like it should, but it = closes after I click the button for the app. How do I keep the script = open until I exit it manually?=20 I have an exit button but for the life of me I can't figure out how to = tell it=20 unless I click EXIT, stay open. I will kick myself in advance in case this is a basic perl coding issue = and not a Win32gui issue. Thanks,=20 Chris |
From: Marjolein K. <win...@ja...> - 2001-05-11 05:21:22
|
Jeremy, What you have there is correct - but how are you using it? When I use an icon for a window (system) icon, it works fine, but I have been unable to make one work on a button (but a Bitmap works in that case). For a system icon the normal size restrictions apply: 16x16 for as it appears in the title bar and a start bar button; add a 32x32 image into the same file if you make a free-standing exe so Windows can display a large icon for it as well. # -- set window icon ------------------ my $I = new Win32::GUI::Icon("hsh.ico"); #hsh.ico contains both 16x16 and 32x32 images $W->SetIcon($I); #W is the previously defined Window At 21:25 2001-05-10 -0700, Jeremy Aiyadurai wrote: >hello all, > > >thankyou for your help so far > >is this Win32::GUI::Icon functional, or is there something wrong with my file. > > >new Win32::GUI::Icon("favicon.ico"); > >thanks > >Jeremy .A Cheers, Marjolein Katsma HomeSite Help - http://hshelp.com/ - Extensions, Tips and Tools |
From: Hirosi T. <ta...@se...> - 2001-05-11 04:57:57
|
> There is now a Win32::GUI::DragDrop module available at > > http://www.bahnhof.se/~johanl/perl/Win32GUI/ > > There is a complete example/demo program in the POD if you would like to > take the trouble to rebuild your Win32::GUI module. I've just tried. The demo program in the POD printed, "Initial state : accepts drops: 0", and memory vioration occured, says, pgm 0x01d61c6a accessed 0x00000000, cann't become as read... (this is really in Japanese) I'm using ActivePerl Build 626 in Win2K pro. I inserted "case WM_DROPFILES" after GUI.xs, line 1839: as instructed, nmake, nmake install. re-boot machine, execute the demo program. Any help? -- Hirosi Taguti ta...@se... |
From: Jeremy A. <bc...@te...> - 2001-05-11 04:29:28
|
hello all, thankyou for your help so far is this Win32::GUI::Icon functional, or is there something wrong with my file. new Win32::GUI::Icon("favicon.ico"); thanks Jeremy .A |
From: Johan L. <jp...@bo...> - 2001-05-11 03:44:45
|
There is now a Win32::GUI::DragDrop module available at http://www.bahnhof.se/~johanl/perl/Win32GUI/ There is a complete example/demo program in the POD if you would like to take the trouble to rebuild your Win32::GUI module. There is also a new version of Perl Oasis which, of course, contains drag-n-drop support (and if you use the binary you won't need to rebuild Win32::GUI). Another nice feature is a useful toolbar floating on top of UltraEdit when you edit your code. Read all about it here: http://www.bahnhof.se/~johanl/perl/Oasis/ /J -- Johan Lindström, Sourcerer, Boss Casinos Ltd, Antigua jp...@bo... |
From: Marjolein K. <win...@ja...> - 2001-05-10 19:15:24
|
Chris, At 20:38 2001-05-09 -0500, Chris Etzel wrote: >I found it. Great! > I had AddTextField instead of AddTextfield. Correct caps are not >my strong point apparently, but I imagine learning them would prevent >further headaches! You know, I do that *all* the time ;-) It's just part of learning how to use this great package. >Thanks for the debugging tips. They came in handy when trying to find the >problem. That's just the general stuff that will basically apply to any programming language. There are some Perl-specific tricks. Have you tried 'use strict;' yet? Cheers, Marjolein Katsma HomeSite Help - http://hshelp.com/ - Extensions, Tips and Tools |
From: Johan L. <jp...@bo...> - 2001-05-10 16:57:36
|
Wohoo! I got it to work! :) It took some XS hacking though. Nothing fancy, mostly copy-paste and common sense. I added the WM_DROPFILES message to the WindowMsgLoop so that it throws an event DropFiles() with the drop handle in question. And once in Perl it was piece a cake to call the shell32.dll functions DragQueryFile and DragFinish to actually get the files. Cool. This is fun! Some code: GUI.xs, line 1839: ---------- case WM_DROPFILES: if(GetObjectName(NOTXSCALL hwnd, Name)) { /* * (@)EVENT:DropFiles(DROP_HANDLE) * Sent when the window receives dropped files. * (@)APPLIES_TO:Window, DialogBox */ strcat(Name, "_DropFiles"); PerlResult = DoEvent_Long(NOTXSCALL Name, UINT(wParam)); } break; ---------- http://www.bahnhof.se/~johanl/perl/Win32GUI/ - AdHoc.pm Perl subs for dealing with the shell32.dll calls handling the drop operation (among other things). - dragdrop.pl Working demo program (if you rebuild the XS code). The actual drag-drop code is this simple in a Perl application: ---------- Win32::GUI::AdHoc::windowDragAcceptFiles($winMain, 1); sub winMain_DropFiles { my ($handleDrop) = @_; print join("\n", Win32::GUI::AdHoc::windowGetDroppedFiles($handleDrop)) . "\n\n"; return(1); } ---------- I guess a more complete solution would include drag-drop to e.g. a RichEdit or Textfield control etc. but I'm not sure what the implications are. I'm not sure how to continue with this. For my personal use, I'm probably gonna create a Win32::GUI::DragDrop module or something (using my XS mod), but maybe this belongs in the next release of Win32::GUI after a code review (after all, I relly don't _know_ these things). Aldo? /J -- Johan Lindström, Sourcerer, Boss Casinos Ltd, Antigua jp...@bo... |
From: Chris E. <ce...@mi...> - 2001-05-10 13:27:21
|
I found it. I had AddTextField instead of AddTextfield. Correct caps are not my strong point apparently, but I imagine learning them would prevent further headaches! Thanks for the debugging tips. They came in handy when trying to find the problem. ----- Original Message ----- From: "Marjolein Katsma" <win...@ja...> To: <per...@li...>; <per...@li...> Sent: Thursday, May 10, 2001 4:16 AM Subject: Re: [perl-win32-gui-users] weird textfield issue > Chris, > > Forgive me if I sound pedantic - but here's some advice from an old hand (slightly rheumatic by now - seriously!) at programming. If you want to find out the hard way (may do!) delete this *now*; don't read any further. > On the other hand...: > > Do *not* hide that DOS (command-line) window until you've fully debugged, alpha-tested and beta-tested your program. Until it's ready for release, you *need* that command-line window. > > Unless you want (or can afford to) to shell out for a debugger - but you don't *need* (to shell out for) a debugger until you've exhausted all other methods. > (When I was starting to writing COBOL there *were* no 'debuggers'. Debugging your code was inserting as many useful DISPLAY statements you could think of and then interpreting the text on the print-out you got back.) I have a debugger for Perl (Part of ActiveState's PDK, which costs $$$) but I rarely use it. I use the command-line window to display my "display" statements (plain old print in Perl) until I'm really stuck. > > If you want to know what goes on in your script, keep that window, and put liberal [print] statements into your code to trace every step: you're robbing yourself of a valuable resource until your code is really working (and confirmed as really working by people using your code). They'll give you a trace of what's happening, and a means of finding problems - well before you'll even *need* a debugger (or this list, for that matter). Leave your print statements (and code variations!) but 'comment them out' while you're trying to figure out something. Once it works, put in a new comment that explains (to you, 6 months later!) why it works. When you can still understand that comment after a week, your're ready to deleted the other commented-out trial-and-error code. If not, go back and explain it to yourself again (if you can still remember why this worked in the first place and something else didn't!); in a comment. > > And don't under-estimate the life-time of your code: trivial code intended for a week or so has a nasty habit of staying alive for 2 years or more... > > Debuggers are a wonderful invention - and I use them. But you don't need them (need to *pay* for them!) until you've exhausted all possibilities of displaying traces and variable values of your program while it's executing. With Perl on Win - that's just what you need your command-line window for: without it (or a debugger): how do you know what's happening? > > My Perl scripts (until ready for release) look really 'dirty' until they're working: they're full of comments of what I'm trying (commented code), and why, and why it doesn't work so what I'm trying next. > So try a few things, put in some print statements, and if your code doesn't work as you intended and you figured out why, put that into a comment as well. Ultimately you'll end up with working code, and comments explaining (to you!) why this works and something else you tried doesn't. > > (OK, I didn't even try your code - I just noticed you disabled the very means of finding out why it didn't work in the first place. IGNORE if you're not interested!) > > At 13:23 2001-05-09 -0500, Chris Etzel wrote: > >Hello, > > > >I am playing around with Win32::GUI trying to refresh my memory on Perl and > >Win32::GUI, and: > > > >I have written a test program that basically brings up a toolbar with a > >button to open a launcher window that I can type a command in and launch > >directly. Well, all works fine exept I can't see the text field. I even > >tried to copy and paste from my working example directly to the new code, > >but still no text field. Before I go insane, can someone look at this code > >and tell me if I messed up somewhere? Thanks! > > > >Chris > > > >----------code below-------------- > > > >use Win32::GUI; > >($DOS) = Win32::GUI::GetPerlWindow(); > > Win32::GUI::Hide($DOS); > > > >my $Toolbar=Win32::GUI::Window->new( > > -name=>'Toolbar', > > -size=>[600,75], > > -title=>"PEaRL ToolBar", > > ); > >my $launcher=$Toolbar->AddButton( > > -name=>'launcher', > > -pos=>[10,10], > > -text=>"Launcher", > > ); > >$Toolbar->launcher->Show(); > > > > sub launcher_Click{ > > my $Launcher=Win32::GUI::Window->new( > > -name=>'CommandLauncher', > > -size=>[300,75], > > -title=>"Launcher", > > ); > > $Launcher->Show(); > > > > my $runline=$Launcher->AddTextField( > > -name=>'CommandBox', #Here is > >where It should show the text field-but doesn't > > -background=>[255,255,255], > > -pos=>[10,10], > > -size=>[150,22], > > -prompt=>'Enter Command:', > > ); > > > > my $runButton-$Launcher->AddButton( > > -name=>'runbutton', > > -pos=>[160,10], > > -text=>'Run', > > -size=>[30,22], > > ); > > $Launcher->runbutton->Show(); > > sub runButton_Click{ > > exec($textfield->Text); > > } > > > > } > > > > > > > > > >$Toolbar->Show(); > >Win32::GUI::Dialog(); > > > > > > > > > >_______________________________________________ > >Perl-Win32-GUI-Users mailing list > >Per...@li... > >http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > > > Cheers, > > Marjolein Katsma > HomeSite Help - http://hshelp.com/ - Extensions, Tips and Tools > > > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users |
From: Marjolein K. <win...@ja...> - 2001-05-10 09:16:22
|
Chris, Forgive me if I sound pedantic - but here's some advice from an old hand (slightly rheumatic by now - seriously!) at programming. If you want to find out the hard way (may do!) delete this *now*; don't read any further. On the other hand...: Do *not* hide that DOS (command-line) window until you've fully debugged, alpha-tested and beta-tested your program. Until it's ready for release, you *need* that command-line window. Unless you want (or can afford to) to shell out for a debugger - but you don't *need* (to shell out for) a debugger until you've exhausted all other methods. (When I was starting to writing COBOL there *were* no 'debuggers'. Debugging your code was inserting as many useful DISPLAY statements you could think of and then interpreting the text on the print-out you got back.) I have a debugger for Perl (Part of ActiveState's PDK, which costs $$$) but I rarely use it. I use the command-line window to display my "display" statements (plain old print in Perl) until I'm really stuck. If you want to know what goes on in your script, keep that window, and put liberal [print] statements into your code to trace every step: you're robbing yourself of a valuable resource until your code is really working (and confirmed as really working by people using your code). They'll give you a trace of what's happening, and a means of finding problems - well before you'll even *need* a debugger (or this list, for that matter). Leave your print statements (and code variations!) but 'comment them out' while you're trying to figure out something. Once it works, put in a new comment that explains (to you, 6 months later!) why it works. When you can still understand that comment after a week, your're ready to deleted the other commented-out trial-and-error code. If not, go back and explain it to yourself again (if you can still remember why this worked in the first place and something else didn't!); in a comment. And don't under-estimate the life-time of your code: trivial code intended for a week or so has a nasty habit of staying alive for 2 years or more... Debuggers are a wonderful invention - and I use them. But you don't need them (need to *pay* for them!) until you've exhausted all possibilities of displaying traces and variable values of your program while it's executing. With Perl on Win - that's just what you need your command-line window for: without it (or a debugger): how do you know what's happening? My Perl scripts (until ready for release) look really 'dirty' until they're working: they're full of comments of what I'm trying (commented code), and why, and why it doesn't work so what I'm trying next. So try a few things, put in some print statements, and if your code doesn't work as you intended and you figured out why, put that into a comment as well. Ultimately you'll end up with working code, and comments explaining (to you!) why this works and something else you tried doesn't. (OK, I didn't even try your code - I just noticed you disabled the very means of finding out why it didn't work in the first place. IGNORE if you're not interested!) At 13:23 2001-05-09 -0500, Chris Etzel wrote: >Hello, > >I am playing around with Win32::GUI trying to refresh my memory on Perl and >Win32::GUI, and: > >I have written a test program that basically brings up a toolbar with a >button to open a launcher window that I can type a command in and launch >directly. Well, all works fine exept I can't see the text field. I even >tried to copy and paste from my working example directly to the new code, >but still no text field. Before I go insane, can someone look at this code >and tell me if I messed up somewhere? Thanks! > >Chris > >----------code below-------------- > >use Win32::GUI; >($DOS) = Win32::GUI::GetPerlWindow(); > Win32::GUI::Hide($DOS); > >my $Toolbar=Win32::GUI::Window->new( > -name=>'Toolbar', > -size=>[600,75], > -title=>"PEaRL ToolBar", > ); >my $launcher=$Toolbar->AddButton( > -name=>'launcher', > -pos=>[10,10], > -text=>"Launcher", > ); >$Toolbar->launcher->Show(); > > sub launcher_Click{ > my $Launcher=Win32::GUI::Window->new( > -name=>'CommandLauncher', > -size=>[300,75], > -title=>"Launcher", > ); > $Launcher->Show(); > > my $runline=$Launcher->AddTextField( > -name=>'CommandBox', #Here is >where It should show the text field-but doesn't > -background=>[255,255,255], > -pos=>[10,10], > -size=>[150,22], > -prompt=>'Enter Command:', > ); > > my $runButton-$Launcher->AddButton( > -name=>'runbutton', > -pos=>[160,10], > -text=>'Run', > -size=>[30,22], > ); > $Launcher->runbutton->Show(); > sub runButton_Click{ > exec($textfield->Text); > } > > } > > > > >$Toolbar->Show(); >Win32::GUI::Dialog(); > > > > >_______________________________________________ >Perl-Win32-GUI-Users mailing list >Per...@li... >http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users Cheers, Marjolein Katsma HomeSite Help - http://hshelp.com/ - Extensions, Tips and Tools |
From: Chris E. <ce...@mi...> - 2001-05-10 06:11:42
|
Hello, I am playing around with Win32::GUI trying to refresh my memory on Perl and Win32::GUI, and: I have written a test program that basically brings up a toolbar with a button to open a launcher window that I can type a command in and launch directly. Well, all works fine exept I can't see the text field. I even tried to copy and paste from my working example directly to the new code, but still no text field. Before I go insane, can someone look at this code and tell me if I messed up somewhere? Thanks! Chris ----------code below-------------- use Win32::GUI; ($DOS) = Win32::GUI::GetPerlWindow(); Win32::GUI::Hide($DOS); my $Toolbar=Win32::GUI::Window->new( -name=>'Toolbar', -size=>[600,75], -title=>"PEaRL ToolBar", ); my $launcher=$Toolbar->AddButton( -name=>'launcher', -pos=>[10,10], -text=>"Launcher", ); $Toolbar->launcher->Show(); sub launcher_Click{ my $Launcher=Win32::GUI::Window->new( -name=>'CommandLauncher', -size=>[300,75], -title=>"Launcher", ); $Launcher->Show(); my $runline=$Launcher->AddTextField( -name=>'CommandBox', #Here is where It should show the text field-but doesn't -background=>[255,255,255], -pos=>[10,10], -size=>[150,22], -prompt=>'Enter Command:', ); my $runButton-$Launcher->AddButton( -name=>'runbutton', -pos=>[160,10], -text=>'Run', -size=>[30,22], ); $Launcher->runbutton->Show(); sub runButton_Click{ exec($textfield->Text); } } $Toolbar->Show(); Win32::GUI::Dialog(); |
From: Piske, H. <Har...@bo...> - 2001-05-09 19:31:24
|
| grid does not | display for me. Instead I get small boxes with one or two | characters in | each, 11 boxes per line. Same here. Just checked on Windoze98, same picture. It seems to me that this script was made some time ago and may have worked with an older version of Win32::GUI. As for the GridLayout itself, check out velocity.activestate.com/code/cpan/w/wi/Win32-GUI.html/docs/html/GridLayout. html That should clarify a thing or two. Although it looks like there's still a lot of room for trial and error ;-) Have fun, Harald |
From: Marjolein K. <win...@ja...> - 2001-05-09 18:56:32
|
I've played with GridLayout a little. The way I understand it, it is to lay out controls on a window. Took me a while to figure out what was happening. For instance: define a grid of 4 rows by 8 columns. Then put a button in the last row and last column (and noting else in that row): you'll get 8 columns all the width of that button - unless another row has a control that's wider, and then you'll get 8 columns all the width of *that* control. It seems to try to make all cells the same width and the same height: add anotehr control and everything rearranges itself. Combined with a Window (resizable) rather than a Dialog (fixed size), it can be pretty hard to get a reasonable layout. Anyway, what happens is pretty clever - but I decided it was not what I was looking for. It's probably useful for things like tool windows, where you can be sure every cell (button) will be same size, but not for general window layout with labels, input controls and buttons, which all should take up different amounts of space (or at least width). I haven't tried dbgrid - but I hope this helps a little anyway. At 13:24 2001-05-09 -0400, Bullock, Howard A. wrote: [snip] >I found Win32::GUI::GridLayout as part of the Win32::GUI package but can't >quite figure out what to do with it. [snip] >Where does Win32::GUI::GridLayout fit into he picture? Any sample or >additional links would be appreciated. > >_______________________________________________ >Perl-Win32-GUI-Users mailing list >Per...@li... >http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users Cheers, Marjolein Katsma HomeSite Help - http://hshelp.com/ - Extensions, Tips and Tools |
From: Bullock, H. A. <HBu...@ty...> - 2001-05-09 17:24:50
|
Can some point to more documentation and/or sample scripts that display multi-row and multi-column data than http://jenda.krynicky.cz/perl/dbgrid.pl.txt as a sample; The grid does not display for me. Instead I get small boxes with one or two characters in each, 11 boxes per line. I found Win32::GUI::GridLayout as part of the Win32::GUI package but can't quite figure out what to do with it. The above script listed above is supposed to provide a grid display using: $LV->InsertColumn(-index => 0,-width => 150, -text => "Row#"); @Cols = $db->FieldNames(); $lastcol=$#Cols; for($i=1;$i<=$lastcol;$i++) { $columname=$Cols[$i]; $LV->InsertColumn(-index => $i, -width => 200, -text => $columname); } Where does Win32::GUI::GridLayout fit into he picture? Any sample or additional links would be appreciated. |
From: <Fo...@ao...> - 2001-05-09 17:14:33
|
Eh, no... I was actually thinking pure SetWindowCapture stuff. Haven't done=20= it in the while, but that's how we used to do it in VB. Dave In a message dated Wed, 9 May 2001 12:43:06 AM Eastern Daylight Time, Johan=20= Lindstrom <jp...@bo...> writes: << Dave wrote: >In all likelihood, your best bet is to subclass the window you want it to=20 >accept the files, then filter for the appropriate message. I can dig up=20 >some MSKB articles on it if you'd like. Um... are we talking subclassing using the Win32::GUI::Class here? After having looked through the XS code, I haven't found any way to change=20 which messages are handled, except for the "predefined" classes with their=20 own MsgLoops. Well... there is this %Win32::GUI::callbacks hash, but I still haven't=20 figured out if I can get it to work with the WM_DROPFILES event. /J -- Johan Lindstr=F6m, Sourcerer, Boss Casinos Ltd, Antigua jp...@bo... _______________________________________________ Perl-Win32-GUI-Users mailing list Per...@li... http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users >> |
From: Glenn W M. <gw...@fo...> - 2001-05-09 11:35:08
|
Can anybody tell me how to set the initial state of a ListView checkbox? I know I can test the state with the ItemCheck method, but what about setting it? I tried setting a "checked" option, but that didn't work: my $item = $mw->ListView->InsertItem( -item => $mw->ListView->Count(), -text => "Name", -checked => 1, ); Thanks in advance for any help. Glenn Munroe |
From: Marjolein K. <win...@ja...> - 2001-05-09 10:44:54
|
How do I get at the system colors? I found a string of COLOR_ names in GUI.pm, and I'm trying to use this: $color = Win32::GUI::constant("COLOR_BTNSHADOW", 0); However, this seems to return only the *index* to that particular color, not the color itself. Is there an interface to GetSysColor() that I can use? (I'm drawing a separator line, and want to use the user's shadow and highlight colors for that.) Cheers, Marjolein Katsma HomeSite Help - http://hshelp.com/ - Extensions, Tips and Tools |
From: Marjolein K. <win...@ja...> - 2001-05-09 10:44:53
|
Here's what I'm using: # -- define window layout ------------- my $W = new GUI::Window( -name => "MainDialog", -title => "Marjolein's XML DTD Parser v0.0.1", -left => $xposinit, -top => $yposinit, -width => $winwidth, -height => $winheight, -minsize => $minsize, ); my $w = $W->ScaleWidth; my $h = $W->ScaleHeight; # -- set window icon ------------------ my $I = new Win32::GUI::Icon("hsh.ico"); $W->SetIcon($I); # Main window ------------------------- my $SB = $W->AddStatusBar( -name => "Status", -text => "Ready" ); my $statheight = $SB->Height; [... and later on ...] # NOTE: this is always called on init of a resizable window! sub MainDialog_Resize { $w = $W->ScaleWidth; $h = $W->ScaleHeight; $SB->Move(0, $h - $statheight); $SB->Resize($w, $statheight); [...] } At 12:00 2001-05-08 -0400, you wrote: >Thanks for the help in understanding the issue. Now on to testing and >learning how use this module... > >[snip] >| -----Original Message----- >| From: Bullock, Howard A. [mailto:HBu...@ty...] >[...] >| The line shown below causes a fatal error and Perl closes. >| >| $Status = new GUI::StatusBar($W, >| -text => " ", >| -width => $W->ScaleWidth, >| ); Cheers, Marjolein Katsma HomeSite Help - http://hshelp.com/ - Extensions, Tips and Tools |
From: Marjolein K. <win...@ja...> - 2001-05-09 06:17:28
|
I'vew been running into problems getting and setting correct font sizes. Since I'm new to this list, I searched the archives, but could find no reference. What I did find was a problem with GetTextExtentPoint32( STRING, [FONT] ) reported to always deliver values that were too large. I didn't investigate, but it might be related to what I'm seeing. I don't know if it's platform dependent (I'm working on Win2000 SP1) but I hope not: if so, my workaround would not work on other platfoms (Win95/98/ME?). The first thing I noticed was then when I create a Textfield and set the font size for it, the fiont size ended up actually smaller than what I specified. Other weird things happened too. So, making a variation on the example program found with the package, I started to experiment and found a number of interlocking problems. Here's a summary: - To ceate a font, there are both size and height attributes. Both should set the font size in points (I think). - When using a font size for a control, it turns out too small - When using the Font dialog, both size and height are returned as output; but both are incorrect: size is size as specified in the dialog - only 10 times larger; height is repirted as a negative number, but even the absolute value is too large. It took a bit of trial and error to figure out what "too small" and "too large" actually meant but looking at the numbers I got a sudden hunch: screens are often assumed to be 72 pixels per inch - but for PCs that is actually (supposed to be) 96 pixels per inch. Guess what: the proportion 96/72 fit exactly the too large/too small values I was experiencing. My workarounds: - To specify a font size for a control, multiply by 96/72 and round up to the nearest integer - If output from a Font dialog is to be used to change the font size for a control, *delete* the size attribute (it's 10 x too large) and take the absolute value of the reported height attribute (still too large inreal terms, but that has the 96/72 "correction" already built in). Examples using the workarounds: #create a Font to use in a control: $fontsize = 8; # intended size $fontsize = int($fontsize*(96/72)+0.5); # workaround for specifying size $fontname = "Lucida console"; #print "fudged font size: $fontsize \n"; $dispFont = new Win32::GUI::Font( -name => $fontname, -size => $fontsize, ); #now use it: $W->AddTextfield( -name => "dispDtdFile", -multiline => 1, -vscroll => 1, -hscroll => 1, -top => $titleheight+2*$pad, -left => $lblleft, -width => $w-2*$pad, -height => $th-2*$btnvspace, -font => $dispFont, -background => $txtback, -foreground => $txtfore, # try if we can color it ); #Change font size for the control (a button "Font..." calls up the Font dialog): sub btnFont_Click { my $key = (); $W->Disable(); # disable window before showing font dialog # --- current font ---------------------- my $hcurFont = $W->dispDtdFile->GetFont(); my %fontdetails = Win32::GUI::Font::Info($hcurFont); # --- choose font ----------------------- my @newFont = Win32::GUI::ChooseFont(%fontdetails); %fontdetails = @newFont; # --- create new font ----------------------- # make -height positive and delete -size to create "corrected" input for creating new font $fontdetails{"-height"} = abs($fontdetails{"-height"}); delete $fontdetails{"-size"}; # --- apply font ----------------------- # create new font object with these parameters my $newFontObj = new Win32::GUI::Font(%fontdetails); $dispFont = $newFontObj; # redefine global font object; $newFontObj gets destroyed $W->dispDtdFile->SetFont($dispFont); # undocumented method!!! $W->dispDtdFile->Hide(); # force repaint $W->Enable(); $W->SetForegroundWindow(); show_controls(); } Cheers, Marjolein Katsma HomeSite Help - http://hshelp.com/ - Extensions, Tips and Tools |
From: Marjolein K. <win...@ja...> - 2001-05-09 05:44:46
|
Talking about status bars - while I have no problem creating a status bar and mn aking it resize with the main window, I wondered if it's possible to create one with different regions. I could really use that since I have different pieces of information I need to show (filename, state, ...) Anyone? Cheers, Marjolein Katsma HomeSite Help - http://hshelp.com/ - Extensions, Tips and Tools |
From: Marjolein K. <win...@ja...> - 2001-05-09 05:30:26
|
Hi, Glad I found this list! And since you'll all be seeing more of me, I thought I'd give a short intro of myself. I was born and raised in the Netherlands - and very nearly moved to the US but that won't happen now that my employer has been taken over by another company, so I'll stay in beautiful Amsterdam. I've been working in IT for many years, different functions, but whatever I do, I still like coding, so if it isn't part of my job, I'll do it in my own time (or both) ;-) I've used many languages, and though at present my Perl is at an intermediate level, it helps that a number of years ago I write a fairly extensive toolset in AWK. (It also sometimes confuses me :) That toolset was to support Clarion programmers; a while later I set out to make "wrappers" round many Win32 GUI functions since while Clarion for Windows was easy to use, it also shielded you from a lot of functionality. That was never finished due to lack of time; but looking at the Win32::GUI package now I can imagine the amount of work that went into it - and admire a job well done! Yes, I know it's incomplete, there are holes in the documentation, and some things don't work right yet - it's still a fantastic job. And fun to work with. Right now I'm working on a biggish project in my own time again - wanting to parse XML DTDs (with the aim of generating files based on the information), and using Win32::GUI to build a Wizard-like user interface to drive the process. Both the parsing and the GUI take a lot of learning how to use it at this point, so I'm alternating between the two. That should give you a little background, and context for the questions, suggestions and workarounds I'll come up with! Cheers, Marjolein Katsma HomeSite Help - http://hshelp.com/ - Extensions, Tips and Tools |
From: Johan L. <jp...@bo...> - 2001-05-09 04:29:37
|
Dave wrote: >In all likelihood, your best bet is to subclass the window you want it to >accept the files, then filter for the appropriate message. I can dig up >some MSKB articles on it if you'd like. Um... are we talking subclassing using the Win32::GUI::Class here? After having looked through the XS code, I haven't found any way to change which messages are handled, except for the "predefined" classes with their own MsgLoops. Well... there is this %Win32::GUI::callbacks hash, but I still haven't figured out if I can get it to work with the WM_DROPFILES event. /J -- Johan Lindström, Sourcerer, Boss Casinos Ltd, Antigua jp...@bo... |