visible button

C

Chris

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

Lap
 
G

Gerald Stanley

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
 
B

Bas Cost Budde

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
 
T

TC

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
 
T

TC

Bas Cost Budde said:
...which can be abbreviated to

yourcommandbutton.visible = yourcheckboxname.value


which can be further abbreviated to:

yourcommandbutton.visible = yourcheckboxname

:)

TC
 
L

Lapchien

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!
 
B

Bas Cost Budde

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)
 
B

Bas Cost Budde

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
 
T

TC

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top