04-17-2014 07:21 PM
I am currently looking into a way to have buttons displayed on the screen, that when the user presses them: the specific key of that button goes into the text area.
As we have seen with both Web Design Cheat Sheet (WDCS) and QuickPost, they have buttons that - when pressed - go into the text area above them.
What I would like to do is to have a button for:
Hopefully you can understand what I mean
Thanks in advance
04-18-2014 09:45 AM - edited 04-18-2014 10:17 AM
Thanks for replying.
As you can see in the image below, the two buttons - that I have put a red circle around - is what I am looking to recreate in my application. So when the button is pressed it appears in the text area above.
For example, if you were to click on the hashtag (#) button, a hashtag would appear in the text area.
Do you know how to do this?
04-18-2014 09:57 AM
Sorry but I think you put the wrong image.
If you want to add text to a textarea on a button click, it's easy but I don't think it's what you want.
Maybe you want to add buttons inside a TextArea ?
04-18-2014 10:16 AM - edited 04-18-2014 10:17 AM
That is the correct image: showing two buttons with different keys in them; one shows: # and the other shows: @
You are right, what I want to do is to create buttons - like in the image - and then when they are clicked the text goes into the textarea.
04-18-2014 07:23 PM
I think @laurentc meant the button's onClicked() signal, within that slot you would possibly query the cursor position of the TextArea control and then use the Editor insertPlainText() function to insert the # character...
04-18-2014 07:50 PM