Ok, my fault. I just tried to fiddle with the EditField.Border prop
and had to consult the Language reference. And there, I discovered the
ReadOnly icon for several props, including Multiline, styled, and
border. I got this being-happy-and-ashame-at-the-same-time feeling...

This implies that there really is no way of setting these properties
programmatically. Why is this? Doesn't make sense to me.
 stefan.


On 3/6/06, Stefan Thurnherr <[EMAIL PROTECTED]> wrote:
> Additional discovery: When setting the multiline property
> programmatically and the styled prop via the window editor's checkbox,
> the NilObjectException does not occur. But the EndOfline plus all
> subsequent text is not displayed in the EditField.
>
> The "inverse" is true as well, i.e., when setting the multiline prop
> via the window editor's checkbox and the styled prop programmatically,
> the NilObjectException occurs.
>
> This suggests that an EditField's styled and multiline property cannot
> be set programmatically, but only via the window editor's checkboxes?
>
> Thanks,
>  stefan.
>
>
> On 3/6/06, Stefan Thurnherr <[EMAIL PROTECTED]> wrote:
> > Hi all,
> >
> > I am having a hard time trying to get an EditField with StyledText to
> > run. I get NilObjectExceptions when trying to assign text to
> > MyEditField.StyledText.Text. Here are the steps to reproduce what I
> > don't understand:
> >
> > 1. Create a new RB project.
> > 2. Add an EditField (say myEf) to Window1 (the default window).
> > 3. In myEf's Open() event, programmatically set me.styled=true and
> > me.multiline=true.
> > 4. Then programmatically add some text, e.g.:
> > myEf.styledText.text="Firstline"+EndOfLine+"secondline.".
> > 5. Run the app; it will cause a NilObjectException at the line
> > mentioned above (my config is RB2006r1 on WinXP).
> >
> > The interesting thing is that when the styled and multiline properties
> > are set via the checkboxes in the window editing GUI instead of
> > setting them programmatically, the NilObjectException does NOT occur.
> >
> > I need to be able to set both properties programmatically though
> > because I am subclassing EditField and my subclass should support
> > styled, multiline text by "definition".
> >
> > I have spent quite some time trying to figure out what the problem
> > here is (including searching the RB archives), but no success. Can
> > anyone help me out here? Maybe it's a simple and stupid thing I am not
> > aware of? I hope so...
> >
> > Thanks,
> >  stefan.
> >
>
_______________________________________________
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>

Reply via email to