Re: Implementation Report
- From: Brendan Murphy <bmurphy@xxxxxxxxxxxxxxxxxxxxx>
- To: ftcdev@xxxxxxxxxxxxx
- Date: Fri, 14 Mar 2008 15:12:42 -0500
Ron Benditt wrote:
readonly edit fields allow text to be selected (highlighted in gray
instead of the normal blue), even if acceptfocus is set to false
This is by design. Consider Apple's Mail program where the email
that is displayed in the main pane is read only, but it allows you
to select the text. Now I could add a property to toggle allowing
selections so that you can't select any text if desired.
Resizing edit fields does not re-center text that was centered.
Page widths also need to be adjusted to make it work. My
understanding is that page widths are not important when using the
control as a normal edit field, but only when you have page mode
active.
There are three modes including page, normal, and edit. Page and
normal modes are virtually the same except in normal mode no
background or page breaks are used. So normal mode will act just
like the page mode when it comes to centering the content.
pageWidth property appears two places - in the formattedText class
and the document class. What is the difference between the two?
Same with .deleteAll What's the difference between the FTC class
and document class implementation?
In general, you can use stuff in the FormattedText class the
methods will handle updating for you. You use stuff at the
FTDocument level when you want to perform a series of operations
and then perform one update at the end.
Along the sames lines... I've noticed that to set the RTF text, you
use the setRtfText method in the FTC class. But to read it, you
have to use the document class's getRTF method. I find that to be
somewhat odd.
Clearly this is brain fart on my part and I will make it
consistent in the next preview.
no boolean return for mousedown event? Returning "true" in regular
editfield signifies that you have handled the event and the no
further action is necessary. I typically use return true here to
disallow mouse clicks.
I will have to think about this one because there are consequences
for doing this.
textchanged event does not fire when text is put in the FTC via
code. This event does fire in the normal edit field.
If you are programatically adding content, you are responsible for
calling the TextChanged event. Call the callTextChanged method
after you are all done adding the content.
If I select empty lines and have them highlighted in blue and then
click and drag across some text to select make a new selection
(highlighted in blue), my origninal selection remains (the selected
empty lines), giving two regions hightlighted in blue.
Confirmed.
Request: Make the insertion point color a property that can be
accessed and set. In a program where I am using the FTC, I
typically have black backgrounds with white text. A black insertion
point does not do well in this instance! While I have altered your
code to make the insertion point draw white, I'll have to make this
aleration on any updates that you come out with. An accessible
property would make my life easier.
That is easy. I'll put it in the next preview.
In the selectionChanged event, I have some code that sets the state
of some buttons to represent the current selection's bold,
underline, and italic states. The idea is that whenever the
selection changes, I want the buttons to represent the state of the
new selection. In the selectionChanged event I have a line of code
like this:
BoldButton.value=LyricDisplay.getDoc.selectionBold
I find that it causes a NilObjectException when I select all of the
text and then hit the delete key. I put some code in the
selectionChanged event so that the code that is in there would only
execute if there was text in the FTC. It still gives a
NilObjectException. The text that appears in the field at the time
of the error is, in hex, "0D0D0D". The number of "0D"'s varies...
usually it is only one of them, but not always. "0D" is a carrige
return, by the way. I've worked around this for now, but I just
wanted you to know that some odd behavior is happening.
I will investigate this.
FTC Website: www.truenorthsoftware.com/Realbasic/FormattedText.html
Set List Options (digest and vacation modes): www.freelists.org/list/ftcdev
List Archive: www.freelists.org/archives/ftcdev
Unsubscribe: Send email to ftcdev-request@xxxxxxxxxxxxx with "unsubscribe" in
the subject field.
- Follow-Ups:
- Re: Implementation Report
- From: Ron Benditt
- References:
- [FTC b15pv11] DrawBackground
- From: Bob Keeney
- Re: [FTC b15pv11] DrawBackground
- From: Brendan Murphy
- Implementation Report
- From: Ron Benditt
Other related posts:
- » Implementation Report
- » Re: Implementation Report
- » Re: Implementation Report
BoldButton.value=LyricDisplay.getDoc.selectionBoldI find that it causes a NilObjectException when I select all of the text and then hit the delete key. I put some code in the selectionChanged event so that the code that is in there would only execute if there was text in the FTC. It still gives a NilObjectException. The text that appears in the field at the time of the error is, in hex, "0D0D0D". The number of "0D"'s varies... usually it is only one of them, but not always. "0D" is a carrige return, by the way. I've worked around this for now, but I just wanted you to know that some odd behavior is happening.
- Re: Implementation Report
- From: Ron Benditt
- [FTC b15pv11] DrawBackground
- From: Bob Keeney
- Re: [FTC b15pv11] DrawBackground
- From: Brendan Murphy
- Implementation Report
- From: Ron Benditt