Re:[wxperl-users] Re: wxPerl 0.23 release

> Mattia Barbon
<mattia.barbon@libero.it>
writes:
> 
> > On Tue, 28 J=
un
2005 22:44:29 +0200
Johan Vromans
<jvromans@squirrel.nl>
wrote:=0D
=
> > Under Windows
the change in the
default font is to
> > be expected=
..
> 
> I'm using Fedora
Core 2...

  :-) I suppose I
could not be m=
ore
wrong...
Anyway: the font
change looks like a
GTK+ 1.2
vs 2.x ch=
ange. For
the button width you
should
try the
wxBU_EXACTFIT style
fo=
r the buttons that
need to be smaller
than standard
buttons.

HTH=0D
=
Mattia
=0A=0A=0A=0A_____________________________________________________=
_______=0A6X velocizzare la tua navigazione a 56k? 6X Web Accelerator di =
Libero!=0AScaricalo su INTERNET GRATIS 6X http://www.libero.it=0A


0
mattia
6/29/2005 11:54:37 AM
perl.wxperl.users 3070 articles. 0 followers. Follow

4 Replies
593 Views

Similar Articles

[PageSpeed] 39

"Mattia Barbon <mattia.barbon@libero.it>" <mattia.barbon@libero.it> writes:

> For the button width you should try the wxBU_EXACTFIT style for the
> buttons that need to be smaller than standard buttons.

This is how the buttons are created:

	$self->{s_cat} = Wx::BoxSizer->new(wxHORIZONTAL);
        ...
	my $b = Wx::ToggleButton->new($self, -1, uc($code));
	$b->SetSize(30, 29);
	$b->SetValue(...);
	EVT_TOGGLEBUTTON($self, $b->GetId, sub { ... });
	$self->{s_cat}->Add($b, 0, wxLEFT, $tborder);

I'd expect the SetSize(30, 29) to make the button (almost) square.
What am I overlooking?

-- Johan

0
jvromans
6/29/2005 3:19:03 PM
Johan Vromans wrote:
> This is how the buttons are created:
> 
> 	$self->{s_cat} = Wx::BoxSizer->new(wxHORIZONTAL);
>         ...
> 	my $b = Wx::ToggleButton->new($self, -1, uc($code));
> 	$b->SetSize(30, 29);
> 	$b->SetValue(...);
> 	EVT_TOGGLEBUTTON($self, $b->GetId, sub { ... });
> 	$self->{s_cat}->Add($b, 0, wxLEFT, $tborder);
> 
> I'd expect the SetSize(30, 29) to make the button (almost) square.
> What am I overlooking?
I don't know if it's considered a bug or a feature, but adding buttons 
to BoxSizers can override the SetSize you're using...I've noticed this 
behaviour using earlier versions than 0.23 too, although not 
consistently...and I don't recall how I worked around it at that time.

So although it's not a solution, I'm pretty sure the source of your 
problem lies there...



-- 
/Jouke Visser/

pVoice website <http://www.pvoice.org> 	
Personal website <http://jouke.pvoice.org> 	
Mail me <mailto:jouke@pvoice.org> 	
Skype me! <callto://joukevisser>


0
jouke
6/29/2005 3:33:26 PM
Hi,

I've only been using Wx::Perl for a short time, but from my 
understanding of the wxWidgets 2.6.1 docs,using SetSize on a sizer 
controlled window/control has little if any useful application.

Following code isn't tested, but looks like it would work to me.

To get a window with a minimum size:
$b->SetMinSize(30, 29);

to ensure this window doesn't change size as the sizer re-sizes:
$self->{s_cat}->Add($b, 0, wxLEFT|wxFIXED_MINSIZE , $tborder);

or, if you'd like the window to resize, upwards only, but maintain 
aspect ratio: (of course, this means you have to let it expand in the 
direction of the sizer in the first place):

$self->{s_cat}->Add($b, 1, wxLEFT|wxSHAPED , $tborder);

Hope this works / helps.


Mark


Jouke Visser wrote:
> Johan Vromans wrote:
> 
>> This is how the buttons are created:
>>
>>     $self->{s_cat} = Wx::BoxSizer->new(wxHORIZONTAL);
>>         ...
>>     my $b = Wx::ToggleButton->new($self, -1, uc($code));
>>     $b->SetSize(30, 29);
>>     $b->SetValue(...);
>>     EVT_TOGGLEBUTTON($self, $b->GetId, sub { ... });
>>     $self->{s_cat}->Add($b, 0, wxLEFT, $tborder);
>>
>> I'd expect the SetSize(30, 29) to make the button (almost) square.
>> What am I overlooking?
> 
> I don't know if it's considered a bug or a feature, but adding buttons 
> to BoxSizers can override the SetSize you're using...I've noticed this 
> behaviour using earlier versions than 0.23 too, although not 
> consistently...and I don't recall how I worked around it at that time.
> 
> So although it's not a solution, I'm pretty sure the source of your 
> problem lies there...
> 
> 
> 



0
mark
6/29/2005 4:15:01 PM
Mark Dootson <mark.dootson@znix.com> writes:

> To get a window with a minimum size:
> $b->SetMinSize(30, 29);

This should be 

  $b->SetMinSize([30, 29]);

> Hope this works

It does! Thanks.

-- Johan

0
jvromans
6/29/2005 5:05:02 PM
Reply:

Similar Artilces:

Re: [wxperl-users] wxPerl 0.23 Release Candidate
Hello, > I'm very interested in using this for 10.4/Tiger, but I'm a= little > worried about how it will "play nice" with the existing wxWi= dgets > install (2.5.3 or 2.5.4 I think) that comes with Tiger. Do yo= u know 2.5.3. > whether those .pkg files will overwrite anythin= g? I have not checked (stupid me). However the wxWidgets package in= stalls the libraries under /usr/local and the wxWidgets binaries are def= initely not there (and if they were they would have a different name). I= have no idea about the wxPerl shippe...

Re: [wxperl-users] wxPerl 0.23 Release Candidate #2
Hello, > I've not seen a changelog so I post my question here. > =0D = > Does this version supports printing of images with Wx::HtmlEasyPrinting= ? This looks like a wxWidgets (not wxPerl) issue, hence the answer = is: I have really no idea, but in any case this depends on wxWidgets,=0D = not on wxPerl. What would be a test case, simply printing an HTML page c= ontaining images? On all platforms or just some? Regards Mattia =0A=0A= =0A=0A____________________________________________________________=0ANavi= ghi a 4 MEGA e i primi 3 mesi sono GRATIS. =0AS...

Re: [wxperl-users] Re: wxperl
yes !! its really time to help more mattia. things i could offer are beside bug reports is to help to buil a better brwosable doku, this is one of my long time wish so are so. herbert "Graciliano M. P." <gmpowers@terra.com.br> schrieb am 11.12.04 03:29:27: > > > hey all, > > > > I just tried downloading the cvs snapshot, Wx-0.20, Wx-0.19, and Wx-0.18 > > and trying to install them on solaris (without luck). I tried both > wxAll-2.4.2 > > and wxWidgets-2.5.3. > > > > Furthermore, I went to the wikis for more in...

Re: [wxperl-users] wxPerl 0.25 released
[ sorry for the formatting ] Hello, > Sorry to be the first to po= st a downer, but I'm still having trouble > building my application usin= g perlapp if I use any 2.6 version of Wx :( Which Windows version is= it? > I've narrowed it down to Wx::Html. If I do a 'use Wx::Html' it= won't > build and I get the error dialog shown at > http://dazz.afoyi.= com/stuff/wxperl_html_error.png Another user (with an older wxPerl v= ersion) reported a crash on exit on Win95 with PerlApp. No idea if this=0D = is related. Regards Matti...

Re: [wxperl-users] Plans for wxPerl 0.23, wxWidgets 2.6.0
Hello, > Mattia Barbon wrote: > > > I am going to provide only w= xWidgets 2.6.x releases from now on, > >and I will consider if I will ke= ep distributing Perl 5.6.x-enabled > >binaries. If anybody is willing to= take the time to compile and relase > >wxWidgets 2.4.x binaries, I will= most gratefully grant him/her the > >appropriate permissions, otherwise= I will just drop those combination from > >binary releases (I will keep= support in the sources). > > > > > If there is anyone who would sti= ll like sup...

RE: [wxperl-users] Plans for wxPerl 0.23, wxWidgets 2.6.0 #2
Hello, > I tried to compile wxPerl CVS against 2.6.0 and I got the = errors as below. > > I am compiling on WinXP using MSVC6. Should this = work? Have others > successfully compiled? Yes, but with MSVC 5 and= GCC (various versions), not MSVC 6. Are you up to date with MSVC servic= e packs? > C:\Perl\bin\perl.exe C:\Perl\lib\ExtUtils/xsubpp = -noprototypes > -nolinen <snip> > Grid.c(390) : warning C4189: 'CLAS= S' : local variable is initialized but not > referenced > Grid.c(464) := fatal error C1001: INTERNA...

[wxperl-users] wxPerl 0.23 release
Hello, I have yet to update the site and send out the official anno= unce. You can get it from http://sourceforge.net/project/showfiles.ph= p?group_id=3D15655 The wxWidgets RPMs this release depends on can= be fond at: http://www.barbon.org/wxperl/0.23/wxWidgets/ (please n= ote that they are not from the wxWidgets team). Regards Mattia =0D = P.S.: phew... done, finally... =0A=0A=0A=0A____________________________= ________________________________=0ANavighi a 4 MEGA e i primi 3 mesi sono= GRATIS. =0AScegli Libero Adsl Flat senza limiti su http://www.li...

Re:[wxperl-users] wxPerl 0.24
Hello, > I hope to have it uploaded by tomorrow. Now uploaded= .. Share and enjoy Mattia =0A=0A=0A=0A_______________________________= _____________________________=0A6X velocizzare la tua navigazione a 56k? = 6X Web Accelerator di Libero!=0AScaricalo su INTERNET GRATIS 6X http://ww= w.libero.it=0A ...

Re: [wxperl-users] wxPerl 0.49_01
Hello, > There are a few files missing from Wx-0.49_01.tar.gz. (I grabbed it off= > pause) > > 1. the whole of directory \ext\media > 2. \ext\datetime\XS\DateSpan.xsp > 3. \ext\datetime\XS\TimeSpan.xsp Fixed. Also fixed the #ifdefs for wxLaunchDefaultBrowser (it is a bug in xsubpp). 0.49_02 being uploaded to PAUSE as I write. Thanks! Mattia ...

Fwd: wxPerl on the Mac; was: [wxperl-users] Re: problems with wxPerl
>To: Jouke Visser <jouke@pvoice.org>, wxperl-users@lists.sourceforge.net >From: Christian Jaeger <christian.jaeger@sl.ethz.ch> >Subject: wxPerl on the Mac; was: [wxperl-users] Re: problems with wxPerl >Date: Sun, 30 Sep 2001 23:08:19 +0100 > >Hello, > >I'm crossposting this reply to the macosx-perl mailing list because >there is some interest, too. Actually I forgot to put the macosx-perl adress on it. >At 14:02 Uhr +0200 24.9.2001, Jouke Visser wrote: >>I wondered if anyone yet tried to compile wxPerl on a Mac. If not, I'...

RE: [wxperl-users] Re: wxValidator available via wxPerl
Mattia, Thanks, as usual, for the to-the-point and quick support! If/when I manage to produce a useful validator, I would be more than happy to submit it. Currently I'm still getting my head round how everything fits together! James > -----Original Message----- > From: Mattia Barbon [mailto:mbarbon@dsi.unive.it] > Sent: 13 December 2001 11:04 > To: wxperl-users@lists.sourceforge.net > Subject: [wxperl-users] Re: wxValidator available via wxPerl >=20 >=20 > > Dear Mattia, > > I would like to use validators in my Perl application, but=20 ...

RE: [wxperl-users] Re: wxValidator available via wxPerl
Dear Mattia (or others, if they can help), I've been delving into how to use wxValidators, and I think I understand the concept (and I like it!). However, I'm having real trouble deriving my own validator (called, unimaginitively, myValidator) from Wx::PlValidator. >From the wxWindows documentation, all validators must implement a Clone method. I have tried implementing a Clone method, which I can see getting called, but myValidator's Validate, TransferFromWindow, and TransferToWindow never seem to get called. Here is my code (with the methods apart from Clone do...

RE: Re: [wxperl-users] Re: Re: EVT_QUERY_END_SESSION
you putted the EVT_CLOSE to the wrong place... or do you have a reason why you need it to be there? $app ist not the window, but you could use EVT_CLOSE on $frame too. i changed your minimal sample that it works. hope it helps greeting Marco ---- use Wx; ########################### package MyApp; use strict; use vars qw(@ISA); @ISA=qw(Wx::App); sub OnInit { my( $this ) = @_; my( $frame ) = MyFrame->new( "Minimal wxPerl app", Wx::Point->new( 50, 50 ), Wx::Size->new( 450, 350 ) ); ...

Re: [wxperl-users] [ANNOUNCE] wxPerl 0.21
> wxFileOffset is not available in 2.5.2, > so streams.cpp/streams.h nee= d a > > #if WXPERL_W_VERSION_GE( 2, 5, 3 ) > ... wxFileOffset ...=0D = Is this the only change required for 2.5.2 support? Thanks! Matt= ia =0A=0A=0A=0A_________________________________________________________= ___=0ARegala e regalati Libero ADSL: 3 mesi gratis e navighi veloce. 1.2 = Mega di musica, film, video e sport. =0AAbbonati subito senza costi di at= tivazione su http://www.libero.it=0A=0A --- "mattia.barbon@libero.it" <mattia.barbon@libero.it> wrote: ...

Web resources about - Re:[wxperl-users] Re: wxPerl 0.23 release - perl.wxperl.users

Resources last updated: 12/1/2015 6:27:30 AM