Le 26 juil. 06 à 17:42 Soir, Jonathan Johnson a écrit:
On Jul 26, 2006, at 10:32 AM, [EMAIL PROTECTED] wrote:
On Jul 26, 2006, at 10:21 AM, [EMAIL PROTECTED] wrote:
Is there a cross-platform method of determining how long a
StaticText control should be given the text inside?
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.
What would you expect it to do? A Graphics instance simply draws to
something. By creating a new Graphics, you're drawing to nothing.
There shouldn't be a way to create a Graphics instance by itself.
I can imagine creating a graphics which draws to nothing. Why should
creating a graphics which draws to nothing make a crash?
For instance, I can use this code:
dim b As PushButton
b=new PushButton
MsgBox str(b.Width)
It certainly does not add a push button somewhere, but it also don't
crash._______________________________________________
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>