Skip to main content
July 20, 2010
Question

"fill in the gap"

  • July 20, 2010
  • 1 reply
  • 382 views

Hi all.

I would like to know how you would go about implementing a "fill in the gap" feature using the TLF, if at all possible.

For example, the following text would be presented:

The quick brown fox jumps over the _______ dog

In the "_______" part I want to get input from the user, it can be a TextInput, a ComboBox, or any other UIComponent based component.

My problems are:

1. What should I use to create this gaps? Since I don't suppose you can include UIComponents inside a textflow, my guess is I will need

to put some sort of flag to indicate a gap and preserve some empty space for the UIComponent to be added later.

2. To add the UIComponent, I will need to locate the flagged element, and get its position (x,y) and width.

3. (less important:) Once the user completed the gap I might want. to turn the gap back to normal text (possibly with a V icon next to it)

Any thoughts or ideas will be greatly appreciated !

This topic has been closed for replies.

1 reply

July 24, 2010

nevermind, I think I got it.

If case anyone else is interested, the basic concept is explained in my new Flex blog.

http://platustalksflex.blogspot.com/2010/07/position-uicomponents-inside-textflow.html