Re: win32lib getTextExtent on XP
- Posted by 1evan at sbcglobal.net
Jul 04, 2003
I dunno. When I run this:
include win32lib.ew
constant MyWindow = createEx(Window,"",0,0,0,640,480,0,0)
procedure Init(integer self, integer event, sequence params)
sequence text, extent
-- the string to measure
text = "Hi, there!"
-- measure the string
extent = getTextExtent( MyWindow, text )
-- show results
wPrintf( MyWindow, "The string %s is %d by %d pixels", {string,
extent[1], extent[2]} )
end procedure
setHandler(MyWindow,w32HActivate,routine_id("Init"))
WinMain()
I get this:
Test.exw:17
Syntax error - expected to see possibly '(', not ','
wPrintf( MyWindow, "The string %s is %d by %d pixels", {string,
extent[1], exten
t[2]} )
^
Press Enter...
Derek Parnell wrote:
>
>
> ----- Original Message -----
> From: "Tony Steward" <tsteward at dodo.com.au>
> To: "EUforum" <EUforum at topica.com>
> Sent: Friday, July 04, 2003 6:43 PM
> Subject: RE: win32lib getTextExtent on XP
>
>
>>Hi Derek,
>>I Use XP home edition with win32lib 57.9 and do not have any trouble
>>with getTextExtent(). I use if extensively to size buttons and LText.
>
>
> Thanks Tony.
>
> I have an app which works fine under win2k, but in XP I'm getting
> zero-length strings. I'm using getTextExtent to determine the size of text
> that Buttons and Labels must hold.
>
> --
> Derek
>
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>
|
Not Categorized, Please Help
|
|