From: Piske, H. <Har...@bo...> - 2001-05-01 00:10:52
|
| Neat idea, but now, instead of seeing the last $message being | passed as the first line of the RichEdit (scrolled to that first line), I | see a blank screen - the autoscroll goes past my last line... Course, | changing the \n around fixes that (with the side effect of a blank first | line), but my autoscrolling problem is still there. | | Any ideas? is the -height of your richie just missing from the code snippet you posted, or do you really manage to create the control with zero height? 'Cause, if I do, my field actually has zero height. Nada. From what you say, it seems to me that your field is just one line high, so you actually would have to scroll to the second-to-last line. Try $Main->Rich->SendMessage (0x115, 7, 0); # scroll to bottom $Main->Rich->SendMessage (0x115, 0, 0); # scroll one line up But let me get this straight, please: $Window->Richie->SendMessage (0x115, 7, 0); sends WM_VSCROLL to Richie with nScrollCode parameter set to SB_BOTTOM. Win32::GUI::SendMessage($logbox, 277, 7, 7); as you had it, happens to do the same thing - the second 7 is actually supposed to be the window handle of the scroll bar, but is unused with SB_BOTTOM, so nothing goes foom from that error. This works fine here with me, whether the WS_VSCROLL property is set or not. Johan's idea of selecting past the end of the field's contents and replacing the selection in order to force an autoscroll, works fine with textfields, but not richedit controls (sorry Johan - dirty trivia Harry has got you again ;-) My question is: why did it not scroll the way you first had it and why does it scroll now - or, the other way 'round: why does MY richedit scroll with Morbus' code and not with Johan's?? I fiddled around with all the parameters and cannot reproduce what happens at your place. |
From: Piske, H. <Har...@bo...> - 2001-05-01 16:06:33
|
| attached the latest Windows.pl file, which is where I'm trying to | accomplish this autoscroll thing. I just ran it with 0.0.558 - all I did was change the $logbox->SendMessage (0x115, 0, 0); to $logbox->SendMessage (0x115, 7, 0); and it did what I believe is what you want it to do - always show the last 16 or so lines of text. |
From: Morbus I. <mo...@di...> - 2001-05-01 19:27:09
|
>I just ran it with 0.0.558 - all I did was change the > >$logbox->SendMessage (0x115, 0, 0); >to >$logbox->SendMessage (0x115, 7, 0); > >and it did what I believe is what you want it to do - always show the last >16 or so lines of text. Dammit, I don't know what my problem is then. I went to SourceForge and grabbed the 5.6 PPM for .558. I extracted it, fixed the basehref in the PPD, and installed. The install went fine - looking at the ~/site_perl/Win32/GUI.pm shows .558. And for sanity's sake, my lines are: # create the log box which is gonna hold all our info. $logbox = $window->AddRichEdit( -name => "_RichEdit", -font => $font, -top => 116, -left => 0, -width => 505, -height => 240, -tabstop => 1, -style => WS_CHILD | WS_VISIBLE | ES_LEFT | ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL | ES_READONLY, -exstyle => WS_EX_CLIENTEDGE ); And: sub gui_note { my ($message) = @_; # select our last line. $logbox->Select(999999,999999); $logbox->ReplaceSel("$message\n", 1); select(undef, undef, undef, 0.25); # autoscroll the log box. $logbox->SendMessage (0x115, 7, 0); # listen for good measure. Win32::GUI::PeekMessage(0,0,0); Win32::GUI::DoEvents(); return 1; } What I'm seeing now is similar to what I was seeing before - the last printed line becomes the first visible line of the window. Sniff. Sniff. I'm gonna have a hissy fit! I swear! <g>... Could you do me a favor, Harald? Could you send me the test script you used to test my last Windows.pl with your code changes (now integrated into my copy)? At least this way, I can pin down if its related to the rest of my code somehow... Argh. Morbus Iff .sig on other machine. http://www.disobey.com/ http://www.gamegrene.com/ |
From: Jeremy A. <bc...@te...> - 2001-05-02 01:20:15
|
Hi all, Thanks for all your help in the past this is my first time using the Perl2exe compiler is this the right command "perl2exe thefile.pl -gui -icon=favicon.ico" if i want to create a gui application with an icon? The perl2exe faq is confusing and i get the following compile errors Perl2Exe V4.03 Copyright (c) 1997-2000 IndigoSTAR Software Pro version Converting 'singletransfer.pl -gui -icon=favicon.ico' to singletransfer.exe Compiling singletransfer.pl Error: File -gui not found Undefined subroutine &main::Cleanup called at D:\backup\perl stuff\p2x56\perl2ex e.pl line 266. |
From: Anthony C. G. <ag...@em...> - 2001-05-02 13:14:10
|
yes, the docs are kind of confusing... it would be: perl2exe -gui -icon=favicon.ico thefile.pl >tony ----- Original Message ----- From: "Jeremy Aiyadurai" <bc...@te...> To: <per...@li...> Sent: Tuesday, May 01, 2001 9:16 PM Subject: [perl-win32-gui-users] Perl2exe > > Hi all, > > Thanks for all your help in the past > > this is my first time using the Perl2exe compiler > > is this the right command "perl2exe thefile.pl -gui -icon=favicon.ico" > > if i want to create a gui application with an icon? > > The perl2exe faq is confusing and i get the following compile errors > > > Perl2Exe V4.03 Copyright (c) 1997-2000 IndigoSTAR Software > Pro version > Converting 'singletransfer.pl -gui -icon=favicon.ico' to singletransfer.exe > Compiling singletransfer.pl > Error: File -gui not found > Undefined subroutine &main::Cleanup called at D:\backup\perl > stuff\p2x56\perl2ex > e.pl line 266. > > > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > > |
From: <Eva...@ao...> - 2001-05-02 03:24:33
|
>>- it doesn't seem to be on a PPM anywhere - I always get .502?<< Are you on a proxy or behind a firewall (or both)? try clearing any caches you might have, then try again. - ___________________________ "Rarely is the question asked: Is our children learning?" ~George W. Bush |
From: Piske, H. <Har...@bo...> - 2001-05-02 23:14:36
|
| Dammit, I don't know what my problem is then. OK, I tracked it down - I'm using Windoze 2000, you are on 98. The workaround is: $logbox->SendMessage (0x115, 7, 0); # scroll to bottom $logbox->SendMessage (0x115, 2, 0); # scroll one page up In your case, where you only ever display one single line, you can also do $logbox->SendMessage (0x115, 1, 0); # scroll one line down because it will only scroll once the scrollbar is visible. Or, how about one line per \n in the message plus one for the \n added outside the var: $logbox->SendMessage (0x115, 1, 0) while $message =~ /\n|$/g; ... okay, this lacks readability, but it works, even under 98 :-) This is for further experimenting and reference, taken from WINUSER.H: /* * Scroll Bar Commands */ #define SB_LINEUP 0 #define SB_LINELEFT 0 #define SB_LINEDOWN 1 #define SB_LINERIGHT 1 #define SB_PAGEUP 2 #define SB_PAGELEFT 2 #define SB_PAGEDOWN 3 #define SB_PAGERIGHT 3 #define SB_THUMBPOSITION 4 #define SB_THUMBTRACK 5 #define SB_TOP 6 #define SB_LEFT 6 #define SB_BOTTOM 7 #define SB_RIGHT 7 #define SB_ENDSCROLL 8 |
From: Morbus I. <mo...@di...> - 2001-05-03 13:44:38
|
>The workaround is: > $logbox->SendMessage (0x115, 7, 0); # scroll to bottom > $logbox->SendMessage (0x115, 2, 0); # scroll one page up > $logbox->SendMessage (0x115, 1, 0); # scroll one line down > >Or, how about one line per \n in the message plus one for the \n added >outside the var: > $logbox->SendMessage (0x115, 1, 0) while $message =~ /\n|$/g; >... okay, this lacks readability, but it works, even under 98 :-) Whoo hoo! The "1" worked perfectly for me. Thanks for hunting this down for me. I appreciate it dearly... You've made the next version of AmphetaDesk (shameless plug: http://www.disobey.com/amphetadesk/) even better... Morbus Iff .sig on other machine. http://www.disobey.com/ http://www.gamegrene.com/ |
From: Morbus I. <mo...@di...> - 2001-05-01 12:41:47
|
>is the -height of your richie just missing from the code snippet you posted, >or do you really manage to create the control with zero height? 'Cause, if I >do, my field actually has zero height. Nada. From what you say, it seems to >me that your field is just one line high, so you actually would have to >scroll to the second-to-last line. Try Actually, giggle, giggle, according to the code, this guy uses a Resize command to make the richie the right height and width. I'll assume from the above that that's the wrong way to do things... The guy who wrote this for me came from a VB background - maybe that's some hangup in those days (I'm the guy who knows nothing about GUI's, but is learning). > $Main->Rich->SendMessage (0x115, 7, 0); # scroll to bottom > $Main->Rich->SendMessage (0x115, 0, 0); # scroll one line up I'll try these out later today and get back to you... -- ICQ: 2927491 / AOL: akaMorbus Yahoo: morbus_iff / Jabber: mo...@ja... mo...@di... / http://www.disobey.com/ |