Print Page | Close Window

Make a CommandBar button visible/hidden?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=4020
Printed Date: 15 September 2025 at 8:55am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Make a CommandBar button visible/hidden?
Posted By: Juzzy
Subject: Make a CommandBar button visible/hidden?
Date Posted: 17 April 2006 at 9:09pm

This must sound like an easy thing to do, but I can't see to find how to do it.

If I have already setup my buttons on a toolbar or in a menu on the form load, how do I access a particular button to change it's attributes like visibility from another function or event?

XS_BAR_TOOL = 100

XS_BTN_PRINT = 2000

If I have a button (XS_BTN_PRINT) on a toolbar (XS_BAR_TOOL), how do I make it invisible? I am not sure how to select the actual object (without referring to .Item(index) ).

Thanks

Juzzy




Replies:
Posted By: Oleg
Date Posted: 18 April 2006 at 10:56am
You can change Visible proprety in Update event handler.

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Juzzy
Date Posted: 18 April 2006 at 5:48pm

What does this mean? This is an event! I want to change the visibility based on some event outside Commandbars, eg like a normal button.

How do I get access to another Control? Do I have to use the .Find method first?

Surely there is a way of accessing it directly without using the Index object?



Posted By: Oleg
Date Posted: 19 April 2006 at 7:45am

Hello,

You can use .Find method, but better add global variable and call Control.Visible = gNeedToHide in UpdateHandler. When you need to change the state just change this variable

gNeedToHide = not gNeedToHide



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net