FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WEBDEV 2024
→
How to disable(grey) a single radio option
How to disable(grey) a single radio option
Débuté par vvido, 07 sep. 2018 15:16 - 4 réponses
Connectez-vous…
vvido
#1
Membre enregistré
94 messages
Posté le 07 septembre 2018 - 15:16
I have a radio button box with several choices (radio buttons).
Depending on the input data I need to disable a particular choice (a single radio button, one of several) in runtime.
How can I do ti ?
Signaler
0
0
meikl
#2
Membre enregistré
118 messages
Posté le 12 septembre 2018 - 13:37
RADIO_YourName[IndexOfOption]..Grayed = whatever
Signaler
0
0
vvido
#3
Membre enregistré
94 messages
Posté le 12 septembre 2018 - 15:41
Thanks for the answer, but strange, it does not seem to work.
I get a compilation error for the following code
RADIO_BackupType[1]..Grayed = True
Error:The 'Grayed' property does not apply to this type of control.
PAGE_backup.ZONE_Layout_Area_CONTENT.ZONE_Main.RADIO_BackupType, Initialization, line 1, column 22
Without the index [1] it disables all the options (expected behaviour) and does not cause compilation error, but the result is not what I need.
This is WEBDEV 23.
Signaler
0
0
Piet van Zanten
#4
Membre enregistré
17 messages
Popularité : +1 (1 vote)
Posté le 13 septembre 2018 - 15:44
Hi,
This is not possible in Webdev.
You need to create your own Radio control.
I did this by creating a control template using a looper with a checkbox and an option text.
The checkbox can be styled to look like a radio button and you need some code to uncheck other options when one is selected.
Advantage is that you don't have to gray options, just fill the looper dynamically with the options you need.
Signaler
0
0
vvido
#5
Membre enregistré
94 messages
Posté le 13 septembre 2018 - 16:31
Hi, after unsuccessful try I have suspected something like this.
Your suggestion with control template is attractive because it is general and reusable.
I will give it a try. Thanks for your time.
Signaler
0
0
→ Revenir à WEBDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte