On Jul 26, 2006, at 10:32 AM, [EMAIL PROTECTED] wrote:
Well, I haven't found a way to get a statictext lengthened
properly, but I have found another way to crash the debug
application (and the standalone, for that matter)
New Project
On the window, put an EditField and a PushButton
In PushButton1.Action, insert this code:
Dim g As New Graphics
EditField1.DrawInto g, 0, 0
EditField1.Width = g.Width
Run it, type in some text, press the button, and poof!!! Your
debug application crashes. This works for RB 2005r4 for OSX
compiling for all platforms.
You can't instantiate Graphics; you must retrieve it from
the .Graphics property of a Picture.
Furthermore, I have absolutely no clue why you would think that
Graphics.Width would change after drawing into it. What you want is
this:
dim p as new picture(1, 1, 32)
dim g as graphics = p.graphics
g.TextFont = MyStaticText.TextFont // And so on with size, etc.
MyStaticText.Width = g.StringWidth(MyStaticText.Text)
Adam Ernst
cosmicsoft
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>