gettingstarted
[Top] [All Lists]

g.stringWidth() NilObjectException

To: gettingstarted at lists dot realsoftware dot com
Subject: g.stringWidth() NilObjectException
From: Barry Lumpkin <barrylum at bellsouth dot net>
Date: Wed, 29 Sep 2004 17:48:59 -0500
Delivered-to: gettingstarted at lists dot realsoftware dot com
In PushButton1.Action I have this code:

  dim g as graphics
  dim length as integer
  g.TextFont="Helvetica"
  g.TextSize=18
  length = g.stringWidth("Testing")
  staticText1.text = str(length)

Why do I get a NilObjectException on the g.TextFont line?

I'm so glad there's a beginner area!  ;-)

Thanks!

Barry

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>