Ok, this is basically what I'm doing right now. I create the raphael text object. I use a click event to open a dialog box. Then I make the changes to the text in the dialog box. This isn't how I wish to implement this though. I want my implementation to be somewhat similar to the way text is created in MS Paint where the user can click on the text object and change the text as they're typing. Does anybody know how to implement this using a raphael text object?
A simple solution would be to create a <textarea> when the user starts editing the text. Fill it with the current text and place it over the text object. Then, when it loses focus (onblur), remove the text area and copy the text back into the text object.
If you really want to edit the text "in place" in the text object, then you can let the user type in a hidden text field. But in this case you'll have to implement all the cursor and selection logic yourself. See this fiddle (which only allows using the right and left arrows to move the cursor, with shift to select text so that you can copy and paste).
Alternately, I don't know if contenteditable works for SVG content, but that would be a very simple solution if it did work.
Related
when I open my excel, macro command run automatically and show "welome".But i want to design it little bit.Is there any way i can change its colour size or text box. below my screen shot. [Its not utmost important but I love to know can i animated this text.]
IMAGE LINK
https://msexcel-analysistabs1.netdna-ssl.com/wp/wp-content/uploads/2013/01/run-a-macro-automatically.png
Are you just calling a standard msgbox in VBA? If so, instead of calling a msgbox, you can create an actual UserForm in Excel VBA. From there, place a label in the "box" and you can format the font in a variety of ways: colors, size, text font, etc.
You cannot do any "fun" animations as far as I know. But you can definitely change the font size and color!
Here is an example (I'm not the most creative person)
You do this under the VBA Project Explorer -> Insert -> Userform. From there you add Labels/Buttons/Whatever objects you would like, and resize the form if you so choose. Then in your module/macro, you call this form instead of using a msgbox.
As far as changing the color and size of the text, Yes, you need to create a UserForm and create the 'Welcome' screen as a custom form instead of using VBA's msgbox.
In VBA, right click on the workbook in the Project Explorer.
Select Insert->UserForm.
Design how you'd like the Welcome screen to display.
In ThisWorkbook's Workbook_Open() sub, put UserForm.Show() to display the custom welcome message when the workbook first opens.
As far as animating said text, Not really. There are some convoluted workarounds using an embedded webbrowser object in order to render a custom animated text javascript file. It is full of 'Potential Risk' notifications for the user and really doesn't look very good. Sorry to burst your bubble :).
I have a QlikView TextBox with some text like "This is a test and it is not working".
Now I want to show the same text on another Sheet in another TextBox and it should always be the same.
So I want to reference the first TextBox, so that the text will be displayed in the second one.
Is it possible to refernce the TextBox by their ID? And if so, how can I realise this?
Create your text box, right click on it, select "Copy to Clipboard -> Object", then go to whatever sheet you want the mirrored text box on (or same sheet if you want it on same), right click and select "Paste Sheet Object As Link". I believe that will do what you want. You could always use a variable to accomplish this if you have a use for the text elsewhere.
You can create a linked object, which will mean that the content of one is mirrored on the other.
Set up a text box on one tab, then drag it onto a new tab whilst holding CTRL+SHIFT, you'll see a little chain link appear as you drag the object.
Now a change in one of these objects will reflected in all of the others.
One component (Windows terminology) or widget (UNIX/X11 terminology) has precisely ONE physical manifestation; that's just a fundamental tenet of geometry management.
In order to have a textbox that "mirrors" another one, so to speak, you must retrieve the contents of the original and post it into the copy. Make certain that you do this every time there's an event that either (a) modifies the text in the original textbox or (b) exposes--that is, renders visible when 'twas previously (partially) invisible--the secondary textbox.
Context
I want the user to review some selections they made earlier. So I display some text describing each selection on a separate control in a userform. Some of the text on the controls is long, extending beyond the width of the control. This is fine; I just want the user to be able to see all of the text without being able to edit it. To do this, I use textboxes that are "Locked" (i.e. not editable) but "Enabled" (i.e. selectable). This way, they can just click and either mouse-drag or arrow-key over to scroll through all the text.
Problem
The (small, aesthetic) problem is that when the user clicks in one of the textboxes, they get a blinking cursor, which is misleading as that is normally associated with an editable textbox.
Possible solutions
Ideally, there would be some way of removing the blinking cursor, while still allowing selection but not edition. However, I'm open to other alternatives that don't have to do with changing the width, or having a scrollbar (the textbox is too short to fit a scrollbar). The best alternative I have so far is changing the background color to a gray to make it slightly more clear that it's not editable.
P.S. I'm very familiar with VBA, so if that's part of the solution, I'm cool with that.
Thanks all!
I had a similar issue, and solved it by using these instructions to create a hidden textbox that the cursor automatically appeared in (invisible to the user).
I want to add a list picker in Live code.When a user click on the Textbox the list picker should open with list of items.How can do that?
Be aware that your text field must be locked in order to send a "mouseUp" message, if that is how you want to show the combo box that Monte suggested. There are other ways around this, if you still want to be able to type into that field. Write back with your exact needs.
The combo box is useful because you can type right into it. If you only want options that will load data into an existing field, a popup or pulldown might be something to look into.
On the left side of the tool palette about the middle is a style of button called a combo box. I think that's what you want.
if I want to format a small snippet of text using the dropdowns (ie Heading 1, 2 paragraph), it often ends up changing the tag for a large snippet of text (or even half the page).
How do i change this behaviour?
When you select part of a tag in Dreamweaver and change the format, DW will change the format of the parent tag.
What you are describing requires a different technique as you are trying to get inline formatting. You need to select the text and then wrap it with a span tag (Danilo's advice is correct in that regard). You then apply the CSS style you want to the span tag to change the format.
So to style No longer want to receive these updates it would look like so:
<p>No longer <span style="font-size:18px;">want</span> to receive these updates?</p>
After DW gets through with it. In Design View after wrapping the text with span, select in the Tag Inspect and switch the Property Bar to CSS mode to style.
When used like this the property inspector will expand the selection to include the parent tag of the selected text, causing the selected option in the property inspector (p, h1, h2, etc) to replace the parent tag with the selected option. you cannot change this operation.
You can make a selection, hit CTRL+T (CMD+T I assume on Mac) which brings up the Wrap Tag editing option, type your tag, then hit enter and the selection will be wrapped with the tag of your choice.