FTC Proxy Problems

  • From: Jim Pitchford <jim@xxxxxxxxxxxxxxxx>
  • To: "ftcdev@xxxxxxxxxxxxx" <ftcdev@xxxxxxxxxxxxx>
  • Date: Tue, 18 Jun 2013 18:06:06 -0500

Bob et al

I am still in the process of trying to use FTC in an app to replace multiple 
text boxes, but continue to struggle.

Following Bob's advice I am trying to use FTCProxy in a single hidden window, 
wFTCProxy.

On MouseEnter into a canvas I create a new FTCProxy via

targetProxy = new FTCProxy( CanvasX, wFTCProxy.target) 

and use that as the targetProxy for all actions within that canvas.

Prior to creating the new targetProxy, if a previous proxy exists I clear any 
selections in that proxy so that they don't reappear in the new proxy and set 
the targetProxy to nil.

I also use targetProxy.ftc.getDisplayPicture to grab a picture of the 
targetProxy to display in CanvasX.paint when the mouse is not in the Canvas.

Thus, in theory, I end up with one hidden window to provide an FTC control on 
demand.

My challenges are now:

1. When taking the picture via getDisplayPicture - it also grabs the Caret if 
it is blinking on at the time of the grab. Use of ftc.blinkCaret(true/false) 
doesn't seem to be able to turn the caret on or off.

2. When moving into the editor - i.e. a new FTCProxy has been created, I often 
get a bleed of the previous canvas' picture showing through the right and 
bottom 2 pixels of the canvas being edited, even though both the canvas and the 
targetProxy.target have been set to the same size.

3. I seem to be unable to get the insertion point to move to the end of the 
current text using ftc.moveInsertionPointToEnd(true) - the insertion point 
stays religiously at the beginning.

4. I need to re-adjust the size of the canvas to match the current height of 
the text using dim newHeight as double = Target.getdoc.getTotalPageLength. This 
works if I stay within one canvas/proxy, but if I move to a new canvas, it 
seems to reflect the height of the previous proxy, even though I issue a 
targetProxy.update(true) after the targetProxy.ftc.setText ("text").

Note that all the above are in ftc.setEditMode.

Any pointers you might have in solving these issues would be gratefully 
received.

Regards

Jim Pitchford
jim@xxxxxxxxxxxxxxxx



FTC Website: http://www.bkeeney.com/products/formatted-text-control
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.


Other related posts: