How can I modify Sencha Ext.form.HtmlEditor behavior? - extjs

I'm using sencha 3.4.
I'm trying to add functionality to the HtmlEditor buttons
https://docs.sencha.com/extjs/3.4.0/#!/api/Ext.form.HtmlEditor
To be more specific:
I want to change the text direction with the text alignment buttons.
At the moment, those buttons are only changing the text alignment and not it's direction.
Thanks.

I could achieve basic reverse with overriding execCmd method of Ext.form.HtmlEditor. But still i think it only takes one button for reversing the text (instead of both left and right justifiers).
Here's the FIDDLE

Eventually, I've added two new buttons for this functionality.

Related

CodenameOne - Dropdown List Design (FAQ Style)

Hi,
I am trying to achieve a similar screen to the one attached here using codename one. Its such that when a question is clicked, the answer drops down beneath it. The text would also have proper line breaks as it fills the screen width.
Is there any component I can use in achieving this using codename one?
I would suggest using the Tree component and setting the icons to null explicitly. This should work reasonably well for something like that and include the animation etc.

how to show multiple fields in a single column editor in extjs grid

We are building an application which is using the grid to show records. Now we cam across with a requirement to show 2 fields(1combo and 1 textfield) in a single cell editor. we have tried with 2columns with 2editors but the problem here is we need to enable the both cell editors at the same time.
this link http://blog.platinastudio.com/?attachment_id=2485 can be helpful for understanding the requirement clearly.
any help will be greatly appreciated!!
Thanks
Sanjeeva
If you are able to use two columns and 2 editors, then you should just need to do the wiring manually, and it should work okay.
For each editor, listen for the beforeedit event
In the handler, call startEdit on the other editor
You'll need to configure the editors to not reset on blur probably, and there may be additional configuration needed to get the interactions right, but in theory it should work out.
If you are trying to use two editors in the same cell, then you can mention xtype:'container' in the editor configuration of the column and add your fields in this container.
An example of this is given here

WPF - checkbox template

I need to create a 2 option button, look like this:
When the left side selected it's turned to green and the right side turned to gray and vice versa.
Any idea how can I do that?
the question is too broad
you should override the default style of CheckBox create 2 CheckBoxs and put them in a GroupBox, this should cover your requirement since checking one will mutually exclude the other
p.s
if you are having problems with creating your own style then you should post your XAML and try explaining what you are having difficulty with..

Form with style

I'm using version 4.1.4
Is it possible to create a form having some fields with a background color ?
something like the next image.
Thanks
Alejandro
I wanted to put an easy answer to this one. This works with 4.1 too.
$form->getElement('yourfield')
->js(true)
->closest('.atk-form-row-line')
->css(array('background'=>'red'));
Of course there are many ways and styling of the forms is described here:
http://agiletoolkit.org/doc/form/styling
http://agiletoolkit.org/codepad/gui/formstyle

Silverlight Spring Effect on TextBlock control

I'd like to create view that if the user clicks on a control, let's say a TextBlock, that the control would spring back and forth in place from where the user clicked.
By spring I mean push back and forth like if there were springs behind the TextBlock in each corner.
I've seen demos of this type of effect, and for the life of me, I can't come up with the name of the effect to help with searches, or find an example of this.
Maybe instead of a TextBlock it would help to image a picture that could be pressed down on, and as if springs were behind it and then would bounce back into place.
I think you are referring to the Gratuitous Graphics Demo that was on display at MIX09. Here is a link to the source code:
http://blogs.msdn.com/henryh/archive/2009/03/20/mix09-the-gratuitous-graphics-demo.aspx
I think you want to change the scale transformation matrix of the text using an animation that has both an ease in and ease out element - most probably a BounceEase or ElasticEase, but you'll need to experiment to see which works best for you.
You'll need to trigger it when you click on the control.
Take a look at this example for some pointers.

Resources