• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Show/Hide buttons on dialog box

Engaged ,
Apr 01, 2021 Apr 01, 2021

Copy link to clipboard

Copied

Is it possible to freeze /unfreeze (show/hide) a text box in a dialog box based on status of another check box located in the the same dialog box?

TOPICS
Actions and scripting

Views

368

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Apr 01, 2021 Apr 01, 2021

You should be able to use the visible control for turning off and on items in the dialog box coupled with a onClick function for the check box.

var dlg = new Window ('dialog','Visibility Text'); 
dlg.gp = dlg.add('group');
var sTxt = dlg.gp.add('statictext',undefined,'Hide This')
var cBx = dlg.gp.add('checkbox',undefined,'Click to Hide')
cBx.value = false

cBx.onClick = function(){
    if (cBx.value){sTxt.visible = false}
    else{sTxt.visible = true}   
    }

dlg.show()

Votes

Translate

Translate
Adobe
Engaged ,
Apr 01, 2021 Apr 01, 2021

Copy link to clipboard

Copied

For now it look like on picture below, but i need to enable if i select No, other fields need to be hiden/frozen.

Screenshot 2021-04-01 at 22.02.17.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 01, 2021 Apr 01, 2021

Copy link to clipboard

Copied

LATEST

You should be able to use the visible control for turning off and on items in the dialog box coupled with a onClick function for the check box.

var dlg = new Window ('dialog','Visibility Text'); 
dlg.gp = dlg.add('group');
var sTxt = dlg.gp.add('statictext',undefined,'Hide This')
var cBx = dlg.gp.add('checkbox',undefined,'Click to Hide')
cBx.value = false

cBx.onClick = function(){
    if (cBx.value){sTxt.visible = false}
    else{sTxt.visible = true}   
    }

dlg.show()

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines