Surface 2.0 SurfaceTextBox get text - keyboard

I having a SurfaceTextBox with text from a database. The user can manipulate the text with the SurfaceKeyboard. But how do I get the new text the user entered?
I looked and didn't find any example.

just look at the .Text property of it

Related

Etherpad: Added links for selected text is getting vanish when trigger /getHtml api

I selected text and made that text link using "ep_embedded_hyperlinks2". Now I want to get all content that is in pad. Trying with  /pads/getHTML api.
This returns all text but no link/url which I made. Is there any way I can get that link/anchor along with all content from etherpad.
https://i.stack.imgur.com/ZapWn.png
Thanks in advance

Create link without line or word numbers

Is there a way to create a link without giving specifications with location?
For example:
I have an xml url that I have loaded into a variable "tLink" which occurs within multiple nodes (using a repeat function). I want to have text such as "Click here to find out more" to be a clickable link which takes the user to the specified url for that node. I can't seem to get textStyle etc to work with variables. How can I do this?
I think Scott got it almost right but I suggest that you set the linkText to the actual link:
set the linkText of word 1 to 2 of field "myLinkField" to "http://livecode.com/
Now you can use that in your linkClicked:
on linkClicked pLink
launch url pLink
end linkClicked
See if the following gets you close to the behavior you want.
Create a new field -- "myLinkField" -- and put the text "Click here to find out more" in the field. Select the first two words ("Click here") and set the text style of the words to link. Lock the text of the field and set the autoHilite of the field to false. Now execute this the message box:
set the linkText of word 1 to 2 of fld "myLinkField" to "tLink"
Now edit the script of the field object to read like this:
on linkClicked pLink
put "http://www.google.com" into tLink
launch url value(pLink)
end linkClicked
Now when clicking the link text of the field, you should see the Google home page launch in your browser.
If you only want to test the value of the clicked text, you can use:
put value(pLink)
... to place the link text in the message box.

Byte Array to Image then display in DialogBox C++

as the title says, ive got this packet which contains the whole JPEG image file, so i've put that into a byte array, now how do i convert this to an image and then display it.
I dont need to save it, just display it then once the user enters an answer, delete it.
If you're wondering, its a captcha image. Something like what JDownloader does with captchas.
edit: i meant how can i display images in dialog boxes
You can use the GDI+ Image class to do this, using an IStream of your JPEG in memory as the input, which can be done using ISequentialStream::Read.

How do I get tag info from text?

I have written an application using Python 2.7 and Tkinter that edits *.docx files. In the Text control where the user is able to write text, I can change the font family and fontsize with tag_add and tag_config. Now I need to write this to new *.docx file. How can I retrieve fontfamily and fontsize that were set in several of the text ranges?
My best guess is to get tag from range and later try to get font from this, but I'm not sure.
I have just solved my problem myself :)
Maybe anyone will need it somewhen. You can read any applied attribute from a tag. To do this, you have to use tag_cget method:
selectedFont = textBox.tag_cget("tagName", 'font')
Now, when we got the font from specially tag, we can get from it other attributes by the same way:
fontFamily = selectedFont.cget('family')
It works! ;)

LWUIT display bold text + normal text

I need to display some Rich-Text in LWUIT.
I was thinking of HTML Component, but I can't get linewrapping there - probably an error on my side.
Another idea would be to use TextAreas or Labels and do it manually.
I'd need the possibility to have bold words in a non bold sentence.
Hello, this is a bold. <- This dot shouldn't be bold.
Is there a way I can achieve that? I think I only can use one Font per Component...
Use a Container with flow layout and just place labels into it. This is what the HTML Component does internally.
Try com.sun.lwuit.html.HTMLComponent class. Use it like,
HTMLComponent htmlComp = new HTMLComponent(null);
htmlComp.setBodyText("<b>Hello</b>, this is a <b>bold</b>. <- This dot shouldn't be <b>bold</b>.");
form.addComponent(htmlComp);
This component will allow you to use html tags inside text. For more information, refer this link: HTMLComponent

Resources