Re: Win32Lib Question
------=_NextPart_000_0012_01BF1F3E.7C9A8CC0
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi Irv,
Maybe the width of the EditText control should be set higher, or the =
formatting string should be changed, but I found no problems, running =
the example below:
--start code--
include win32lib.ew
without warning
atom junk
constant
Win =3D create(Window, "edit-control", 0, 0, 0, 200, 200, 0),
EditText1 =3D create(EditText, "", Win, 10, 10, 100, 20, 0),
Number =3D 129.95
procedure onLoad_Win()
setFont(EditText1, "FixedSys", 12, 0)
setText(EditText1, sprintf("%12.2f", Number))
end procedure
onOpen[Win] =3D routine_id("onLoad_Win")
WinMain(Win, Normal)
--end code--
----- Oorspronkelijk bericht -----=20
Van: Irv Mullins=20
Aan: EUPHORIA at LISTSERV.MUOHIO.EDU=20
Verzonden: zondag 24 oktober 1999 20:47
Onderwerp: Win32Lib Question
Hi:
I am using some edittext controls for numbers, and it would be nice if =
the numbers would
line up vertically, but that won't happen with proportional fonts.=20
However, when I change the font to a fixed-width font, either Courier =
or Fixedsys,=20
suddenly the numbers drop off at the decimal point: e.g. 29.95 is now =
shown as 29,
and 1.49 is shown as 1, so things don't line up still, and worse, the =
numbers are screwy.
I'm loading the controls with =
setText(EditText1,sprintf("%8.2f",mynumber)).....
Any ideas?
=20
Thanks,
Irv
=20
------=_NextPart_000_0012_01BF1F3E.7C9A8CC0
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>Hi Irv,</DIV>
<DIV> </DIV>
<DIV>Maybe the width of the EditText control should be set higher, or =
the=20
formatting string should be changed, but I found no problems, running =
the=20
example below:</DIV>
<DIV> </DIV>
<DIV>--start code--<BR>include win32lib.ew<BR>without warning<BR>atom =
junk</DIV>
<DIV> </DIV>
<DIV>constant<BR> Win =3D create(Window, =
"edit-control", 0, 0,=20
0, 200, 200, 0),<BR> EditText1 =3D create(EditText, =
"", Win, 10,=20
10, 100, 20, 0),<BR> Number =3D 129.95</DIV>
<DIV> </DIV>
<DIV>procedure onLoad_Win()<BR> setFont(EditText1, =
"FixedSys",=20
12, 0)<BR> setText(EditText1, sprintf("%12.2f",=20
Number))<BR>end procedure</DIV>
<DIV> </DIV>
<DIV>onOpen[Win] =3D routine_id("onLoad_Win")</DIV>
<DIV> </DIV>
<DIV>WinMain(Win, Normal)<BR>--end code--</DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
<DIV style=3D"FONT: 10pt arial">----- Oorspronkelijk bericht ----- =
</DIV>
<DIV=20
style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>Van:</B>=20
<A href=3D"mailto:irv at ELLIJAY.COM" title=3Dirv at ELLIJAY.COM>Irv =
Mullins</A> </DIV>
<DIV style=3D"FONT: 10pt arial"><B>Aan:</B> <A=20
href=3D"mailto:EUPHORIA at LISTSERV.MUOHIO.EDU"=20
title=3DEUPHORIA at LISTSERV.MUOHIO.EDU>EUPHORIA at LISTSERV.MUOHIO.EDU</A> =
</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Verzonden:</B> zondag 24 oktober =
1999=20
20:47</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Onderwerp:</B> Win32Lib =
Question</DIV>
<DIV><BR></DIV>
<DIV><FONT face=3DArial size=3D2>Hi:<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I am using some edittext controls for =
numbers,=20
and it would be nice if the numbers would</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>line up vertically, but that won't =
happen with=20
proportional fonts. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>However, when I change the font to a =
fixed-width=20
font, either Courier or Fixedsys, </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>suddenly the numbers drop off at the =
decimal=20
point: e.g. 29.95 is now shown as 29,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>and 1.49 is shown as 1, so things =
don't line up=20
still, and worse, the numbers are screwy.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I'm loading the controls with=20
setText(EditText1,sprintf("%8.2f",mynumber)).....</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Any ideas?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Irv</FONT></DIV>
<DIV><FONT face=3DArial =
------=_NextPart_000_0012_01BF1F3E.7C9A8CC0--
|
Not Categorized, Please Help
|
|