On Mar 10, 2008, at 8:02 PM, Brendan Murphy wrote:
Ron Benditt wrote:I'm attempting to migrate from a very buggy WordGuise plugin to the Formatted Text Control. After a short look, I have a few questions/comments:The first thing to do is read the programmer's guide. It is only about 60% done, but it will address a lot of the questions you will have. Also, skim through the FTC mailing list archive to learn from what has already been written.
I've skimmed the programmer's guide and I will read it through thoroughly.
Setting mode to anything besides Page results in an OutOfBoundsException in FTDocument.drawNormalViewMode.Examine the demo project see on how to do this. See the TestWindow menu handlers for examples of changing the mode.Assumption that everyone is has or is using the spelling checker plugin is not valid. For what I'm doing, I don't want or need a spelling checker, so I'm not going to pay $500 for a plugin that I don't need. I've had to comment out a bunch of code and delete the spelling modules to get FTC running. I hope I don't have to do that every time that you put out an update. I suspect that most of FTC users are in my situation.You are not required to use any spell checker or you can use the spell checker of your choice. It sounds like you are starting with the FTC demo project. All you need is the FTC folder to be imported into your project. You can also drop in my spell checker into your plugins folder and run it in demo mode (thus requiring no changes to the demo).
Ha! Yes, I was starting with the demo project. I just deleted that folder from my project and put the one from the download in there and I see that there are no spelling module issues anymore. Sorry about that!
How can the background color of the page be set? Not the blue area behind the page, but the area where the text is drawn on. I see the changeBackgroundColor method in the document class, but I have no idea of what to put in for the FTInsertionOffset parameters. The only way that I can see, at the moment , to get a FTInsertionOffset object is to call getInsertionOffset. That gives me one of the two parameters that I need. I just want the whole area to be different than white, set in the control's open event, if possible.I think you are looking for FTDocument.setPageBackgroundColor. changeBackgroundColor controls the color behind the text itself.
Yep, sure was!
Can the page width and height be changed apart from design-time? Right now I'm looking to implement something like an edit field that resizes when the window resizes. I have a feeling that I should not be using Page mode, but as pointed out, I get errors when I choose other modes. At some point, I do anticipate using the FTC in another project where I would like to use page mode, however it would be nice to allow the user to select paper size. I can already anticipate US/Europe paper size differences!Yes you can change the page size apart from design time. Look at the FTEditField subclass included in the FTC distribution. It is designed to mimic the behavior of a plain old EditField except with the advantages of the FTC. It is a subclass of FormattedText class that configures the control to edit mode and set the margins appropriately. Again the demo shows you how to switch between modes if you want to do it manually (see the TestWindow menu handlers).
Thanks, I'm starting to get things working now!
I look forward to using this control. It will be so nice to leave WG behind!!!!I would like to hear details of your experiences with WordGuise.
I'll email you off-list. Thanks! Ron Benditt Alien Apparatus Company, Inc. http://www.alienapparatus.com 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.