move image in text area in flex - apache-flex

alt text http://img31.imageshack.us/img31/1183/tedit.jpg
Hi Guys,
I am trying to make a text editor in Flex.
i can move image on mouse click.
Problem is it moves with the key up or down handler. But it moves out of text area after the last line in textarea. And it also doesn't move with scroll.
Pls give suggestions for these problems.
Thanks.
Regards,
Shivang

You may want to increase the white space of your 'text editor'. Just have numbers up till person entered text. That way when you move to the bottom you are not moving outside of the textArea.
would need more example of what is going wrong with the key up or down handler. What events are you trying to capture? How are you dragging the image?
good luck.

Related

The page scrolls up instead of the caret moving down

I use wysihtml5 editor. I can type a text normally only till it fits the textarea window. After that a scroll bar appears (which is fine) but let's say I want to type new line on the very top of the text area and when I press enter the line which was just typed moves up outside of the top border of text area and cursos stays on the same first line. So in order to see the first line in the document I just typed I need to scroll one line up. All that instead of the text line stays in place and cursor moves one line down.
That is not usual text editing beheavor. Why is that? Is that an CSS issue?
I guess this has to be an attribute of the text area itself.. but I have no idea how.. I'm myself a beginner in this..
try to search for extra attribute of text-area like:
<textarea rows="2" cols="20" wrap="hard">
....
</textarea>
good luck..

Qt - Scrolling the Text under a widget

Can anyone plz try to solve my problem. i have a frame, in that am scrolling a text. now i have added 2 widgets at both the ends of the frame. Using the stylesheet i had changed the color of the 2 widgets in black color. Now my text starts scrolling above the black color of the widget. But what i want to do is, the text should start scroll below the widget and it should end by scrolling below the widget. How can i do this? Hope u guyz got my question... Herewith i had attached the screenshot of my frame for your reference. Plz Help.. Thanks in Advance.!
You need to set the z-depth of the side components. Try calling raise() on them.

text display starting from bottom up qt

How would I display text in something like QTextEdit starting from bottom up? QTextEdit starts writing at the top filling down to bottom. I want to start from the bottom and then pushing the previous text up as more text is added. I figure I could hack it and simply fill the field with nextlines to reach the bottom then reprinting whatever was written before again when text is to be added, but I wouldn't want to do that unless there isn't any other way.
insertPlainText inserts text at the current text position. You could move the cursor to the start of the docuement using the moveCursor function.
Every time you want to add some text do the following:
textEdit->moveCursor(QTextCursor::Start);
textEdit->insertPlainText(textToBeAdded);

menu bar where the width of the text is variable

I need to know how do I get the menu where the background depends upon the text entered. As in the image, the background gets expended irrespective of the text in the menu item. Also the sides of the background image should not get distorted.The image is here.
I still tend to use the sliding doors technique for this kind of thing.
http://www.alistapart.com/articles/slidingdoors/
Although there is probably a newer and more elegant solution these days.

move arrow image infornt of line in textarea with Flex

I want to move arrow image in textarea on mouse click and key up and down like text editors.
Pls give me ur suggestions
Regards,
Shivang
You need to implement this with a combination of a click handler and a skin that draws the arrow for the cursor.

Resources