disabled-control

Swing - How to imitate the why my look and feel draws disabled icons?

心不动则不痛 提交于 2021-01-28 21:46:57
问题 When you set the icon for a Swing control (say a JButton ), a disabled icon with grayed-darker colors automatically generates. I want to be able to imitate the way the icon colors are changed for the disabled state, so I can create my own disabled icon with a little twist, and set it as the disabled button. Is there a way to achieve this (other then first instantiating the control and retrieving it's icon, I'm looking for more straight-forward less hacky way)? 回答1: Is there a way to achieve

Swing - How to imitate the why my look and feel draws disabled icons?

若如初见. 提交于 2021-01-28 20:59:06
问题 When you set the icon for a Swing control (say a JButton ), a disabled icon with grayed-darker colors automatically generates. I want to be able to imitate the way the icon colors are changed for the disabled state, so I can create my own disabled icon with a little twist, and set it as the disabled button. Is there a way to achieve this (other then first instantiating the control and retrieving it's icon, I'm looking for more straight-forward less hacky way)? 回答1: Is there a way to achieve

Tooltip is not displayed for a disabled html button in mozilla firefox

流过昼夜 提交于 2020-01-14 03:09:09
问题 Mozilla Firefox will not display tooltips of disabled controls. Is there another way to display them? I would prefer a solution without using javascript. There is an easy method I could find is to change in css styles is button, input { position: relative; width: 200px; } button[disabled]:hover:before, input[disabled]:hover:before { position: absolute; top: 10px; left: 10px; content: attr(title); background-color: #ffffe1; color: #000; line-height: 10pt; font-size: 8pt; border: 1px solid #000

Action of JSF h:commandButton not invoked after setting disabled=true in JavaScript

我与影子孤独终老i 提交于 2020-01-11 11:55:08
问题 Who can explain the following behaviour? When disabling a command button in JavaScript, the action method is never executed. <h:form> <h:commandButton value="test" action="#{bean.test}" onclick="disabled=true" /> </h:form> 回答1: When a HTML form element is disabled, then its name=value pair won't be sent as HTTP request parameter and hence JSF will never find it in the request parameter map. For command buttons this in turn means that the action is never invoked. You need to disable the button

Change style in Scout Eclipse Rap

自作多情 提交于 2020-01-06 13:49:31
问题 I would like to change appearance of some element in rap scout project. I found folder with RAP.application.css file in it, but it is empty. I would like to know how to use it, for fields disable color,... Marko 回答1: I am afraid there is no single documentation page where you will find the information. Here some inputs on the eclipse scout forum: Scout Web App + CSS How to change theme on RAP client How to change theme (color) 来源: https://stackoverflow.com/questions/26117826/change-style-in

Disabling items in a Navigation Drawer in Android

余生颓废 提交于 2020-01-03 02:45:13
问题 I'm using the Navigation Drawer Example downloadable here. I'd like to extend this example to disable the selection of one of the planets. For simplicity, lets say I want to permanently disable the selection of Saturn, and change the text of Saturn to dark gray, and have it not highlight when a user selects it. (in reality, I would like to disable navigation programmatically when a user has changed certain values on the screen not yet saved to the device). The closest thing I've gotten to

How can I disable a DIV “acting like a submit button” after it is clicked once?

末鹿安然 提交于 2019-12-25 11:14:17
问题 I have a div that is working like a submit button so when a user clicks it it submit a form and it sends a ajax request to the server. The problem that I am having is that if the user click the button twise, the it create duplicate even it is an AJAX request. So What I am trying to do is simply disabling the and re-naming it to, "Please wait..." until the request is completed. to prevent the double submit. So my question is how to rename and disable "gray out" a div after the click using

Angular 5: Validating disabled fields

北战南征 提交于 2019-12-24 07:02:52
问题 I found this post but it cant solve my problem. I can't validate a simple form with FormControls disabled. I did make a stackblitz example here, please check out my code and verify that is impossible to verify the value of the name control if it's disabled. Stackblitz code Thank you in advance. 回答1: Solution by @Eliseo: If you want not loose the validate you can use [attr.disabled]="true" (or any condition). This give your control an apparence of disabled but still is "validating". 来源: https:

Actual text color on disabled button

这一生的挚爱 提交于 2019-12-24 01:08:35
问题 VB2012: I am creating a button control and inheriting from the .NET button. Taking the base from here https://blogs.msdn.microsoft.com/jfoscoding/2005/11/10/building-a-splitbutton/ Since I am repainting the button I have to introduce some code to change the button text when disabled. So from past experience I went right away with SystemColors.GrayText . But comparing that to a normal .NET button, the color when disabled seems a bit off. After experimenting the one that comes pretty close is