How to get the selected text from webview? - iphone-sdk-3.0

If I holds the finger on a word displayed in web view,
highlight the word with corner anchors to allow
me to stretch the selection across a span of
words. Once a block of text is
highlighted, it gives me the option to copy text.
Can i get that highlighted text without coping it?
Thanks in advance

This one worked for me: Cocobuilder archive
In short, you need:
[[myWebView selectedDOMRange] toString];

Related

How can I insert circled numbers with text in button label/text, vb.net

I am trying to insert circled numbers with (a-z) text on button labels/text in a desktop vb.net application. Wingdings 2 font has what I need for the circled numbers but has no regular (a-z) text and the button font property does not allow two different fonts in the same button label/text.
In scouring the internet, I can find nothing, but I am sure I am not the first to need this feature.
The goal is to have a circled number at the beginning of each button label/text, so that the user can click the buttons in the right sequence.
You should be be to paste them in as Unicode in most fonts. Here are some Sans Serif ones, just try to copy and paste them with the rest of your button text:
🄋 ➀ ➁ ➂ ➃ ➄ ➅ ➆ ➇ ➈ ➉
If this does not work for you, You may want to try a button image instead. Maybe use something like Paint.Net to make the text you want into an image, and then set that as the button image. I'm not sure if you can do that in a sizable way with SVG or PNG or if you would have to make several images for different sizes and use code to switch them.
FYI, I got these characters from this site, if you want more options: http://xahlee.info/comp/unicode_circled_numbers.html

How can I set the line height of a multi-line PDF form field, and save it so it doesn't get reset by filling it?

I am having the exact same issue described in this question: Multiline pdf text box
I have a PDF that has some dotted lines that I want to convert into a fillable multi-line field. I tried the solution in the linked question, but my setting is not staying when I try to fill in the field outside of Acrobat.
When I am preparing the form inside Acrobat, I set the line height to 30 and it is lining up fine:
But when I save this PDF and then try to fill in the field outside of Acrobat, the line height setting does not stay. It gets reset every time:
It's super frustrating and I have scoured the internet looking for an answer but I have nothing yet. If someone knows what to do to get the line height looking like the first screenshot, please save my sanity.
I'm using Adobe Acrobat Pro DC 2021.001.20135 on macOS 10.14.6.
Thank you
You can't. Those settings don't "stick" when the field is cleared and there's no way to set them programmatically. It's best to simply remove the lines from the PDF.
As #joelgeraci stated, the settings don't stick.
However, if the form has to be manually fillable, removing the writing lines may not be the best idea. In this situation, it would be better to change the field's background color. When the field has no content, its background color is transparent, otherwise white. And that will cover the writing lines.

How can I make an image float or right-align in a Google Colab markdown cell?

To explain the process that is going on in my notebook code, I use markdown text boxes between snippets of code. I would like to use small images to illustrate the text (a diagram often makes text clearer).
I cannot find a way of having those images floating on the right however.
I tried adding tags with CSS styling, but Colab seems to be removing those. I tried wrapping things in , but again no luck there.
You can also use the now deprecated align attribute on the image tag.
https://html.com/attributes/img-align/
One option is to use an HTML cell with the code hidden, which is triggered by the presence of a form title. For example, create a code cell with this content:
##title Some Stuff
%%html
Here are some words.
<img src="https://www.w3schools.com/html/smiley.gif"
style="float:right;width:50px;height:50px;">
Here are some other words and there is an image floating around it.
Then execute the cell & double click on the rendered title to hide the source. The result looks like this:

Access Report: Wrap Text Not Working

I have a report with unbound textbox's in them. I populate these fields onLoad.
The problem, though, is that the if the text is too long, it will not wrap. I have set Can Grow = Yes but this does not seem to work.
Is it due to the fact I am adding the string to the field OnLoad? If so, how can I overcome this and force the text to wrap? I would want the width to remain constant, but the height to grow.
Figured this out... I right clicked the text box and selected Size > To Fit...
I had the box big enough to accommodate a second line. It wouldn't ever word wrap until I made the change above. Can Grow and Can Shrink did nothing, but I left them selected.
I open report from code in design mode, make changes to control source of the text fields, save and close report and lastly open it in preview mode. The only way I get what I want.
I know this is an old post but I've been running into the same issue and haven't been able to figure out a solution until now.
One of the fields in print preview was getting cut off for me and despite my best efforts to make sure all the formatting settings were correct (i.e. Can Grow/Shrink: On) for both the detail section and the specific field. Again, this issue only happened in print preview, which meant the reports that were getting printed had the text cut off.
Solution:
I ended up realizing that all of the other text fields were set to Plain Text and the text field giving me the issue was set to Rich Text. I changed it to Plain Text and voila! It displayed everything without any issues.
My guess is that if you're having this issue, make sure all of the fields are set to the same property (Rich Text/Plain Text). Not sure why Access has trouble with this but I hope this solution helps someone else out.
The simple solution to this huge problem is listed below.
Convert the property of the textbox from plain text to rich text.
Set the text align property to distribute.
Enable can shrink and can grow property of the text box. (Yes)
Done.
After a lot trial-and-error, the solution seems to be that the text box that you want to scroll must have enough height to show two vertical lines. A textbox that is only one line high will not scroll. (You must also have Can Grow set to 'Yes' for both the textbox and the detail section.)
You also have to have the CAN GROW of the section that the text box is in set to YES as well as the text box.

A Text value change on Powerpoint by using OpenXml doesn't fit

I use OpenXml for creating custom powerpoint presentation in this way: I put a keyword on the presentation, I found it during process with OpenXml and change the text value. Everything work fine but the fit option doesn't work at first.
The text box has options "Autofit: Shrink text on overflow; Wrap text in shape: On"
After my process, the new text appear on the right place but the autofit is not done, I need to click on the text box and make a input for see the autofit work. I think that PowerPoint only check option after a modification.
What I want is the autofit option is called at the end of the process. Can anyone help me?
I hope you understand what I want to do.
Thanks.
It's not possible using just OpenXML. The <a:normAutofit/> tag is used by a client application, such as PowerPoint, to render the text larger or smaller, as needed. OpenXML doesn't actually render anything, so until the client does, it will just read the text as if it is not auto-fitted.
There are a few options to think of to control this - none of them great however. One would be to use VSTO or VBA in PowerPoint to check all shapes on PPTX open and if they have a AutoFit tag, to re-render them. A second way would be to do all the font measurements yourself based on the shape's width & height and then set the font scale to the appropriate percentage. Another would be to make a textbox large enough to fit the largest amount of text you will ever insert and then turn autofit off.
Sorry this doesn't really help you immediately. I've done tons of research on this particular subject and it's all bad news.