From: Waldemar B. <wb...@sa...> - 2007-04-25 18:56:11
|
Hi! I have already asked about the problem earlier but no one could answered me. I am doing it again reformulating the question. The answer (positive or negative) is very important for me. I have two input fields (in html/css dialect): 1. <input style="border:groved #ff0000 2px;" value="groved field" /> 2. <input style="border:solid #ff0000 2px;" value="solid border field" /> The first one is a normal textfield in Win32::GUI. I would be very, very pleased I someone could give me a way how to get textfield which looks like the second input. Maybe it is outside the possibilities of MS Win32::GUI library. Such information is also very vary precious. Anyway! I would be happy getting any help! |
From: Robert M. <rob...@us...> - 2007-04-25 20:54:28
|
Waldemar Biernacki wrote: > I have two input fields (in html/css dialect): > > 1. <input style="border:groved #ff0000 2px;" value="groved field" /> > 2. <input style="border:solid #ff0000 2px;" value="solid border field" /> > > The first one is a normal textfield in Win32::GUI. I would be very, very > pleased I someone could give me a way how to get textfield which looks > like the second input. Maybe it is outside the possibilities of MS > Win32::GUI library. Such information is also very vary precious. Remove the WS_EX_CLIENTEDGE extended style: #!perl -w use strict; use warnings; use Win32::GUI qw(CW_USEDEFAULT WS_EX_CLIENTEDGE); my $mw = Win32::GUI::Window->new( -left => CW_USEDEFAULT, -size => [400,300], ); $mw->AddTextfield( -pos => [10,10], -size => [100,20], ); $mw->AddTextfield( -pos => [10,35], -size => [100,18], -remexstyle => WS_EX_CLIENTEDGE, ); $mw->Show(); Win32::GUI::Dialog(); $mw->Hide(); exit(0); __END__ Making the border 2 pixels wide and red (as per your html/css) is (much) harder. Regards, Rob. |
From: Waldemar B. <wb...@sa...> - 2007-04-25 21:31:40
|
Robert May napisał: Thank you Rob! I'll can control my screens much more now. Waldemar > Waldemar Biernacki wrote: >> I have two input fields (in html/css dialect): >> >> 1. <input style="border:groved #ff0000 2px;" value="groved field" /> >> 2. <input style="border:solid #ff0000 2px;" value="solid border >> field" /> >> >> The first one is a normal textfield in Win32::GUI. I would be very, >> very pleased I someone could give me a way how to get textfield which >> looks like the second input. Maybe it is outside the possibilities of >> MS Win32::GUI library. Such information is also very vary precious. > > Remove the WS_EX_CLIENTEDGE extended style: > > #!perl -w > use strict; > use warnings; > > use Win32::GUI qw(CW_USEDEFAULT WS_EX_CLIENTEDGE); > > my $mw = Win32::GUI::Window->new( > -left => CW_USEDEFAULT, > -size => [400,300], > ); > > $mw->AddTextfield( > -pos => [10,10], > -size => [100,20], > ); > > $mw->AddTextfield( > -pos => [10,35], > -size => [100,18], > -remexstyle => WS_EX_CLIENTEDGE, > ); > > $mw->Show(); > Win32::GUI::Dialog(); > $mw->Hide(); > exit(0); > __END__ > > Making the border 2 pixels wide and red (as per your html/css) is > (much) harder. > > Regards, > Rob. > |
From: Waldemar B. <wb...@sa...> - 2007-05-02 21:41:19
|
Hi! Now I've got another problem. Memory one. Here is an application that make ten windows if you press right arrow key and destroy them if you press left arrow key. After I create 10 windows Windows Task Menager reads that perl is using 6704K memory (I use WinXPHE sp2). This is maximal number of windows, nothing more! But - after a while - if you try to press these arrows then amount of used memory will rise. Meantime I am writing the email after about 20 arrows I have 6752K memory.... next - after running some other programs - I have 6800K now (100K more and this a very simple application!). Now I have 6820K hmmm... where is the end? It seems to be connected with other processes/programs when they startet or ended (6860K). Could someone help me and answer the questions: 1. has attached application errors (what) 2. Is that memory problem normal feature in perl (maybe perl problems with OO programming?) 3. Maybe it's connected only with Perl/Windows? 4. Or maybe Perl modules are dirty written? any comments are very usefull! ps.I'm finishing writing with the value of 2896K... ######################################################## #! c:\Perl\bin\perl.exe -w use strict; use warnings; use Win32::GUI qw(); my @Window; my $which = 0; my $max = 10; my $last = -1; makewindow(); Win32::GUI::Dialog(); exit 0; sub makewindow { return 1 if $last > $max - 2; $last++; $Window[$last]{SCREEN} = new Win32::GUI::Window ( -title => "Window: ".($last+1), -pos => [20+$last*120, 200], -size => [100, 300], -name => "Window_$last", -onKeyDown => \&keydown, ); $Window[$last]->{SCREEN}->Show(1); print "window $last created\n"; $which = $last; } sub keydown { my ( $self, undef, $key ) = @_; return 0 unless $key; if ( $key == 39 ) { makewindow(); } elsif ( $key == 37 ) { if (( $which == $last )&&( $last>0)) { print "window $last deleted\n"; $Window[$which]{SCREEN}->DESTROY; $last--; $which--; $Window[$which]{SCREEN}->SetFocus(); } } return 1; } __END__ ######################################################## |
From: Robert M. <rob...@us...> - 2007-05-06 21:36:00
|
Waldemar Biernacki wrote: > Hi! > Now I've got another problem. Memory one. [ Please start a new eamil, with an appropriate subject line for a new problem ] {edited] > Here is an application ... > After I create 10 windows Windows Task Menager reads that perl > is using 6704K memory (I use WinXPHE sp2). > after a while then amount of used memory will rise. How long is a while? I see no problem (win98, win2k, perl 5.8.8 AS build 819, Win32::GUI v1.05) after 15 minutes. > Meantime I am writing the email after about 20 arrows I have 6752K > memory.... next - after running some other programs - I have 6800K now > (100K more and this a very simple application!). Now I have 6820K > hmmm... where is the end? > It seems to be connected with other processes/programs when they > startet or ended (6860K). > Could someone help me and answer the questions: > 1. has attached application errors (what) > 2. Is that memory problem normal feature in perl (maybe perl problems > with OO programming?) > 3. Maybe it's connected only with Perl/Windows? > 4. Or maybe Perl modules are dirty written? > any comments are very usefull! > ps.I'm finishing writing with the value of 2896K... 2896K is much less than the 6800K you reported earlier in this mail, so that doesn't look like a memory leak to me. My suspicion is that you are reading the 'Memory Usage' column in task manager? If so then that is the amount of your application that is currently in physical memory [1], and that value will vary depending on what memory demands other applications have. Typically it will go down if your application is not doing anything and other applications need memory, and then will go up again as you start to use your application again. If you want to look for leaks then a better metric is the 'Peak Mem Usage' column, which can be made visible from one of the menus in task manager. Finally, you don't say which version of Win32::GUI you are using, but if it is not 1.05, then there may well be leaks that have been fixed by later versions. Regards, Rob. [1] Actually the process' 'working set'. |