RE: [perl-win32-gui-users] Wrapping text

2001-09-24 Thread Piske, Harald
> This is probably a simple one, but I can't find out how to wrap text,
> for example the "text" property for a Radiobutton.
> I tried with a Perlish carriage return+newline such as "bla \r\n more
> bla", which did not work. What code do you use?

I dunno if this comes down to the same side-effect or has anything to do
with it. I just remembered Aldo talking about labels and multiline captions
in this thread:


> -Original Message-
> From: Aldo Calpini [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 06, 2001 03:42
> To: Renat Araslanow
> Cc: perl-win32-gui-users@lists.sourceforge.net
> Subject: Re: [perl-win32-gui-users] bug_or_feature [1]

Renat Araslanow wrote:
> Subject: Can't see label with user defined font
> Reason: '-escapement' tag in font definition"

this is a (rather unpleasant) feature :-)
the label is there, and the text is even rotated 90, but it
falls outside of the label area. the reference point for the
text is the upper left corner of the label, so when you rotate
it, the text is above the label area. the following ASCII art
should (hopefully) explain what's happening:

   T
   X
   E
   T
  +--++--+
  |TEXT  ||  |
  +--++--+
  normal  rotated

I did some research and found that, in order to see at least
some of the text inside the label, you need this:

$W->AddLabel(
-name=>"ok",
-left=>0,-top=>100,
-width=>500,-height=>500,
-align => 'center',  # center horizontally
-addstyle => 0x200, # SS_CENTERIMAGE (center vertically)
-font=>$font1,
-text=>"ooo",
);

the only drawback to this is that SS_CENTERIMAGE works only for
a single-line text. if you try it with more than one line, it
just doesn't wrap.

another pretty ugly workaround to fit the text in the label area
is to add some newline before the text (eg. -text =>
"\r\n\r\noo").

> when i write in C and use it - it working pretty good.

you should've been writing something else, because in C it works
exactly the same way as Win32::GUI.


cheers,
Aldo

__END__
$_=q,just perl,,s, , another ,,s,$, hacker,,print;




Re: [perl-win32-gui-users] Wrapping text

2001-09-24 Thread Jeremy Dack

Try adding -wrap=>1

Jeremy

At 08:36 24/09/01 +0200, you wrote:

This is probably a simple one, but I can't find out how to wrap text,
for example the "text" property for a Radiobutton.
I tried with a Perlish carriage return+newline such as "bla \r\n more
bla", which did not work. What code do you use?

Thanks,

Marcus




___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users





[perl-win32-gui-users] Tutorials

2001-09-24 Thread Brad Currens
I just decided to take Win32-GUI for a test drive and
tried the following sample.  It abortrf on the
addlabel method.  I'm running on Win2000 and I've got
the latest release of Win32-GUI I believe, release
0.0.558.  If I comment that line out it runs fine.
Also, I also noticed that the tutorial page one is
missing.

use Win32::GUI;
$main = Win32::GUI::Window->new(
-name   => 'Main',
-width  => 100,
-height => 100,
);
$main->AddLabel(-text => "Hello, world");
$main->Show();
Win32::GUI::Dialog();


sub Main_Terminate {
-1;
}

Thanks in Advance
Brad



__
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. 
http://im.yahoo.com



RE: [perl-win32-gui-users] Tutorials

2001-09-24 Thread Jason Bingham
> I just decided to take Win32-GUI for a test drive and
> tried the following sample.  It abortrf on the
> addlabel method.  I'm running on Win2000 and I've got
> the latest release of Win32-GUI I believe, release
> 0.0.558.  If I comment that line out it runs fine.

Labels and most controls seem to need a -name tag

The original code crashed on my system too... With this slight modification
it works fine for me.

JB

== Begin Perl Code ==
use Win32::GUI;
$main = Win32::GUI::Window->new(
-name   => 'Main',
-width  => 100,
-height => 100,
);

$main->AddLabel(
-text => "Hello, world",
-name => HelloLbl # HERE IS THE CHANGE
);

$main->Show();
Win32::GUI::Dialog();

sub Main_Terminate {
-1;
}
== End Perl Code ==



[perl-win32-gui-users] Scrollbar Questions

2001-09-24 Thread EvanK40767
I've actually got 2 different questions, both concerning scrollbars...

First, on a Listview control (with gridlines and multiple columns), it works 
so that if the height of it is less than the height of the items in it, it 
automatically adds a vertical scroll bar...now how can i tell if there's 
*actually* a scrollbar on it?

Second, how can i determine (using any win32 module, really) the default 
width in pixels of a scrollbar on each seperate user's computer?  for 
instance, on mine, it's 16 pixels, but someone else's computer, it may be 5 
pixels, or even like 32 pixels...how can i tell?

so, if anyone can answer my questions, or even point me in the right 
direction, it'd help me out a LOT.

-