By default ToolbarOptions contains copy, cut, paste, selectAll options. Can we add a custom action? For example, an action which will keep the selected text and remove unselected one.
It's currently not possible in flutter, you can only control show or don't show default actions by the toolbarOptions property of TextField.
There is a pull request on github to add this functionality but it's not fully done.
You can use Selectable to customize the toolbar options and assign actions upon press. You can also grab the selected text.
https://pub.dev/packages/selectable
Related
I have a set of radio buttons that are placed within a box.
When the user selects an option, these buttons needs to be disabled. I cannot find a relevant property to disable all items within the box.Only option I can find is to set the hidden property.
box.isHidden=true
NSButton inherts from NSControl, which has an isEnabled property. If you want your radio buttons to still be visible but not clickable, use that.
Currently the sap.m.Dialog only have the addButton method which can only add Button control, I just want to add the checkbox in the dialog footer like "Don not show this dialog again"
Update: as of commit cc55b10 (available in UI5 1.110), sap.m.Dialog comes with the new footer aggregation which awaits an instance of sap.m.Toolbar. There, you can add anything you want such as the sap.m.CheckBox.
For UI5 version lower than 1.110 (previous answer):
Adding a checkbox to the dialog footer is currently not supported as the corresponding aggregations <buttons>, <endButton>, and <beginButton> all await only sap.m.Button (or controls derived form it). I filed an enhancement request on GitHub in case you're interested.
The closest solution I could think of right now is to add ...:
sap.m.ToggleButton with the toggle text Don't Show This Again, or
sap.m.Button with the text Close And Don't Show This Again
... next to a normal close button.
My custom CQ5 component has a dialog which consists of 2 drop down menus. I would like to automatically set a default value to second menu depending on whatever is the value selected from the previous drop down.
How can I achieve this?
you can register handlers for different events triggered by the widgets. You can use the "selectionchanged" event to register a function that will read the new content from the dropdown and then use the setValue() method in the second dropdown to put whatever you want there.
To obtain the second dropdown from the first you can use the nextSibling() method.
The widget documentation will help you a lot. look for "selection"
Am working in message based iPhone app. I have added UITextView to show the messages typed by the user. This app allows the user to copy the messages. Whenever the user selects the messages in the bubbles the Copy option showing in middle of UITextView. How to show the Copy option in Top of the TextView?
Can anyone please help me to solve this issue? Thanks in advance.
Gopinath, this is in-built. You cannot change the default behavior. One option could be to write your own custom TextView which would show the copy option at the top. A workaround could be this:
Just let the user select the text (disable showing 'copy' in the UITextView)
You add a button at the top of the bubble
When the user selects the text & clicks on your UIButton 'copy', then copy whatever is the selection programmatically in your own method.
I have two controls ControlEdit and ControlView with some inputs and checkbox and two views ReadOnly and Edit, I was using MvcContribn checkbox helper to make checkbox disable I did set attribute disable to true on defaultView(here I am loading ControlView) by default user chant make any changes on that view, then if user click change button he comes to edit view (ControlEdit) and here everything enabled.
For some reason every time on EditView check box became unchecked. I was trying to use default check box html helper - the same story.
On edit view it is always becoming unchecked. When I remove disable true attribute on ViewControl then it is became working and in that case check box does not loosing his state on EdivVew.
Then I was using jQuery to set checkbox disable, didn't help. I did look different browsers the same story everywhere. I am getting correct behavior only when i does not setting disable to true on ReadOnly view.
May be somebody come across that. Need help.
-FIXED-
Finally I fixed that,
I wrapped checkbox in to div and make checkbox disable inside div like this
$('#DivWrapper :input').attr("disabled", true)