visible button

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

Is it possible to make a command button visible only if one particular check
box is checked..?

Lap
 
In the AfterUpdate event handler of the Check box try
something along the following lines

If {yourCheckBoxName} Then
{yourCommandButtonName}.Visible = True
Else
{yourCommandButtonName}.Visible = False
End If

Hope That Helps
Gerald Stanley MCSD
 
Gerald said:
In the AfterUpdate event handler of the Check box try
something along the following lines

If {yourCheckBoxName} Then
{yourCommandButtonName}.Visible = True
Else
{yourCommandButtonName}.Visible = False
End If

Hope That Helps
Gerald Stanley MCSD

....which can be abbreviated to

yourcommandbutton.visible = yourcheckboxname.value
 
From a user interface viewpoint, it might be better to enable and disable
the button, rather than making it visible and invisible. See the Enabled
property in online help.

HTH,
TC
 
Bas Cost Budde said:
...which can be abbreviated to

yourcommandbutton.visible = yourcheckboxname.value


which can be further abbreviated to:

yourcommandbutton.visible = yourcheckboxname

:-)

TC
 
From the users POV if teh checkbox is ticked (it means that the 'job' is
'commercial') a command button becomes visible, which when pressed sends a
fax requisition to the customer... I don't want the fax button to show
unless it's a commercial job!
 
TC said:
which can be further abbreviated to:

yourcommandbutton.visible = yourcheckboxname

Sure; until the default property of checkboxes changes to something
else, that is acceptable practice. (I do it all the time)
 
Lapchien said:
From the users POV if teh checkbox is ticked (it means that the 'job' is
'commercial') a command button becomes visible, which when pressed sends a
fax requisition to the customer... I don't want the fax button to show
unless it's a commercial job!
You may feel so, user interface guidelines tell a different story. For
command buttons the issue is not as urgent as for menu items, though.

Do what you like but consider the experience gathered in those guidelines.

http://www.isii.com/ui_design.html
 
Sure, I understand that the command button is not relevant when the checkbox
is not ticked. But my point is this: making a command button visible &
invisible is a non-standard way of dealing with that situation. Users tend
to think, "Oh, what's wrong, that command button just disappeared!" The
standard way to do it, is to make the button disabled when it is not
relevant. If you look at other programs, you'll find that the vast majoruty
use disabling - not invisibling (!) - in these situations.

But of course, either will work, in terms of achieving the desired end
result!

Cheers,
TC
 
Back
Top