Adobe flex copy paste htmlText into a text area - actionscript-3

I've a textArea1, i'm copying htmlText from a different textArea2 to the current text area, it bring the formatting of the textArea2, that is ok, when I clear the textArea1 text, when I start typing, i still get the same format of the textArea2, how do i know what was pasted into the textArea? I've tried paste event, it did not trigger any thing.
What i'm trying to acheive is, try to find out what was pasted here, if the style of the text that is pasted is different, then try to update the styles to the original. How to achieve this?
Thanks.

I had to reset the htmlText property of the control. This has done the trick. Thanks.

IF you want to check the current style of the textfield you could simply use
textfield.getTextFormat()
and then compare it to your initial one. And if you want to check on paste, try using the Event.CHANGE event.

Related

Text area/input hard to select/edit for some cells (tabs/empty spaces?)

So I have Create & an Update view with Django. Both use the same template for the form. (It doesn't seem to be a Django problem perse, but in case it turns out relevant...)
With the CreateView, I can easily click into a textarea widget and edit its value. With the UpdateView however, I seem to need to use a bunch of click before somehow I manage to edit the content of the area. I have compared the html/css in both cases & they are exactly the same.
Upon further inspection, it seems that the imported data contains tabs in some empty fields (hence why it only appends in the UpdateView). So the issue appears to be that when I click anywhere in the input/textarea, the tabs make it hard to actually focus/select the cell. That may be why random clicks (or double-clicks to select the tab?) appear to allow me to edit properly.
I'm unsure if the tabs originate from the source data somehow, or just got added along the way. Of course I'll probably figure out a way to clean out that data.
Is there a quick css/jquery fix for this? Some sort of $('input').on("click"...) handler I could use? Of course one option would be to clean up the source data. However if for whatever reason they've been living fine with those in their previous system, I might just leave it & go for a quick fix, should one exists.
Something like this:
<textarea name="descfr2" cols="40" rows="10" maxlength="60" id="id_descfr2"> </textarea>
https://codepen.io/logikonabstractions/pen/GRWPROO
You could use the focus() method from jquery (https://api.jquery.com/focus/).
Try to add the event on your cells so that the input inside became focused on click:
$('.cells').click(function(){
$(this).find('input').focus();
}
I would do something like that (if you can select all your cells with some class attributes)

Why is my website going blank everytime I edit a row in Wp_options?

I have a wordpress theme and I am trying to change a bit of text that I can only really find in the database. It's a bit of title text that I can only find in the wp_options database.
I found the bit of text I need to change in wp_options, in a row under "of_options"
...";s:16:"translation_port";s:16:"Recent portfolio";s:23:"translation_relatedpost";
s:7:"Related"; s:27:"translation_advertise_title";s:28:"Our Nights";
s:20:"translation_morelink";s:9:"Read more";s:24:"port_project_description";s:20:
That above code does not have any breaks in it, I only changed it for ease of reading.
Just ran another test, and I dont actually have to change a single bit of text, purely opening the row for edit, then saving it without touching anything messes it up.
No logos, images, layout or anything shows. Only the background image :/
I have no idea, tried everything.
Any help would be appreciated.
Don't try to edit this field in the database.
What you see here is a serialized array.
'of_options' refers to 'Options Framework' and is an array containing all chosen options.
Look under Appearance for an options links. The values will be editable there. If somewhere else you need to add more info to your question for help to be provided.
Never fully read it.
Was a part in the theme edit menu to change the titles under a translation tab. My bad.

Flex 4 ColorPicker not editable

I've got an application with several ColorPickers in them - they're just used as-is, no data provider-derived colours or anything - with editable = true. However, the textfield used to display/input the hex code for the selected colour is greyed out and uneditable. I can't find any help for this, only a plethora of tutorials telling me to set editable as true, which obviously doesn't work.
Have also tried binding to data array of colours, but this does nothing except stop the field from being greyed out (though no text appears or can be edited inside it).
Does anyone know how I can stop this happening? Thanks in advance.
It works for me just fine in Flex 3.6A and 4.6.0. Is there maybe something else your doing that is non standard? What theme are you using? Can you produce a test case that demonstrates the issue? (PS: sorry, I can't add comments yet)
Works for me with Flex 4.10.0 (can edit the text field):
<mx:ColorPicker id="_bgPicker" showTextField="true" />
Appears a dodgy font (set as the default for the entire application) was not showing up in the hex panel - forcing it to Arial did the trick. Probably more a result of the crazy set of fonts we have to use than anything but worth doing if anyone else gets a problem like this!

Microsoft Access z-index property

I have a form including listboxes. I'm trying to change order of listboxes. I tried bring front or send back but they are not working in form view. I found z index property for arranging their priority. However, following codes are not working. Is this correct way to do it? Or is there any other way with or without codes to do this?
Me.Controls.SetChildIndex (Me.List0 , Me.List1)
Thanks for any help.
Without using code:
You can change the z-order by right-clicking any control and selecting "Position" then selecting either "Bring to Front" or "Send to Back."
Unfortunately, Access does not support the ZOrder method for manipulation using code. Microsoft Forms does support the ZOrder method which can get confusing when it comes up on Access Help.
As I reread your question, I wonder if you're talking about tab order. If so, right-click and bring up "Properties," select the "Other" tab, then adjust the "Tab Index" property. Also, make sure that the "Tab Stop" property immediately beneath is set to "Yes." In code you would use FormName.ControlName.TabIndex=0 to set a control to the first tab position.
Hope this helps!
Reference: Personal experience (and hours of frustration)
docmd.RunCommand acCmdDesignView
forms("form1").Controls("text0").inselection=true
docmd.runcommand acCmdSendToBack '(or docmd.runcommand acCmdBringToFront)
docmd.RunCommand acCmdFormView
Also, ZOrder is still not supported by Access 2016. As such, I have not yet learned a way to write a single line of code that puts a control in between two others, I just send the middle to back and then the back to back, and expand this to however many controls have to overlap.
And last, even though you use the VBA for ZOrder, your English does ambiguously sound like forms("form1").Controls("text0").TabIndex=34, which as Olek suggested, is also quite simple.
I did this on one Access form: The control I wanted on top I just cut and pasted it back to the form, then moved it over the one I wanted to cover. In this case, it was a text box (bound), almost the same size as a combo box (unbound); only the dropdown of the combo extended a bit to the right of the text box, so when the form was loaded the text box looked like a combo box. The user clicked the dropdown and made a choice and the record(s) pulled up were reflected in the text box.

Disable object, during busy cursor showing

I've a complex text field which I can embed types of font within it. When I try to choose a specific font through the Dropdownlist, I'll show the busy cursor till font embeds inside the text field completely.
I want to disable my text field based on showing busy cursor... I mean when the busy cursor is showing disable the text filed and after disappearing that, just enabled text field again.
How can I do that?
Is there any specific listener for that or what?
Thanks in advance
If you share some code it would be easier to answer. Or just try this, just check the condition over there there is a method called useHandCursor or useBusyCursor. where you used to show that method. just check that condition and disable that. I hope it works.