Disable selection of a CheckBox in Flex - checkbox

I have a checkbox defined as below:
<mx:CheckBox id="chkUseAmountDue" change="useAmountDue(event)>
What I want is that it should be displayed, but user should not be able to select or deselect the checkbox.
Please suggest.

Use the enabled attribute inherited from UIComponent:
<mx:CheckBox id="chkUseAmountDue" change="useAmountDue(event)" enabled="false">
Typically, instead of 'false' you could use a boolean variable that depends on the state of the app.

Related

Incorporate dropdown and dialog together in React Typescript

I am new to react and need your help.
I have a dropdown and on selecting a value I am checking if selected value is not meeting a condition I need to prompt a dialog box to user if he wants to continue to go with the selection,if he selects yes then selected value to be saved in database.
On select and on selecting yes are two callback functions. My query is how to set the state for current selected value during OnSelect callback so that I can make it available within OnSelectYes also.
You should look into https://react-select.com/async
Will make it easier to make this select component that you want.

I have two dropdowns in my angular js Page, If i will select superuser from one dropdown then another dropdown should be disabled

I have two dropdowns in my angular js Page, If i will select superuser from one dropdown then another dropdown should be disabled,but again if i will change the value from superuser to something else in another dropdown then it will be enabled again.How can i do that?
Thanks in advance
There are several ways to do this, but all rely on using the ng-disabled directive on the second dropdown.
You could use a method to determine if the select should be closed, but I feel those sorts of methods fire too much. It's clearer to give each user a boolean to describe if they are a "super user" or not.
Once you select the user (binding the user to the scope using ng-model), you can then pass ng-disabled the selected users "super user" boolean to disable it or not.
Check out this plunker, using ctrl as ... syntax. http://plnkr.co/edit/QQOxnPj1Mn9McgDSMInB?p=preview

Multi Select using angular schema forms

I am currently using multiselect checkbox in a dropdown using angular schema forms and my requirment say to disable some other control based on a value selected But I am unable to bind any events to checking of a check box in multi select.
Can anyone Help me on this?
If I understand well you want to remove controls base on some condition of other controls. I made it by adding a condition on the form definition like:
"condition" : "model.nameOfField == 'valueOfField'"

Angular-ui Bootstrap Tabs - Is there a way to prevent tab selection?

I am using Angular-UI Bootstrap tabs and would like to prevent tab selection during the select event handler. I have tried setting the tab.active to false and setting another tab.active to true, but that doesn't appear to work while in the context of the select event handler.
You can try 'disabled' instead.
Something similar to:
ng-click="tabs.disabled = ! tabs.disabled"
that should disable or enable the tab.
It turns out that I was trying to set the status to a primitive scope value when it seems to require an object with a property that holds the boolean value.

Enabling Disabling TextField on the fly

I am using extjs-4, I want to enable/disable textfield on the fly depending upon data being loaded.
I tried setting disabled and readOnly property to true/false whenever needed but it doesn't seem to get applied.
Is there any other way to achieve it?
Call the setDisabled and setReadOnly methods on the TextField to manipulate those properties after the field is created.

Resources