Re: getTextExtent do not work

new topic     » goto parent     » topic index » view thread      » older message » newer message

----- Original Message -----
From: Bent Olsen <microprog at YAHOO.COM>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Friday, January 28, 2000 1:39 PM
Subject: getTextExtent do not work


> Greetings,
>
> Can some one tell me why this does not work?
> I'm using win 3.11 with win32s extension.
>
> I have attached txtextnt.exw and ex.err

Hi,
Try the following code, which works on Win 98. If it fails on Win 3.11, then
the problem must be with win32s.

Regards,
Irv
--  code generated by Win32Lib IDE v0.8

include Win32Lib.ew
without warning

----------------------------------------------------------------------------
----
--  Window Window1
global constant Window1 = create( Window, "Test Extent", 0, Default,
Default, 350, 250+ 19, 0 )
global constant LText1 = create( LText, "LText1", Window1, 33, 45, 268, 36,
0 )
----------------------------------------------------------------------------
----
procedure Window1_onClick ()
end procedure
onClick[Window1] = routine_id("Window1_onClick")

----------------------------------------------------------------------------
----
procedure Window1_onOpen ()
object extent, text
text = "Hi There!"
extent = getTextExtent(Window1,text)
setText(LText1,sprintf("Extent of %s is %d x
%d",{text,extent[1],extent[2]}))
end procedure
onOpen[Window1] = routine_id("Window1_onOpen")



WinMain( Window1, Normal )

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu