Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Make a CommandBar button visible/hidden?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Make a CommandBar button visible/hidden?

 Post Reply Post Reply
Author
Message
Juzzy View Drop Down
Newbie
Newbie
Avatar

Joined: 06 April 2006
Location: Australia
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote Juzzy Quote  Post ReplyReply Direct Link To This Post Topic: Make a CommandBar button visible/hidden?
    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

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 18 April 2006 at 10:56am
You can change Visible proprety in Update event handler.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Juzzy View Drop Down
Newbie
Newbie
Avatar

Joined: 06 April 2006
Location: Australia
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote Juzzy Quote  Post ReplyReply Direct Link To This Post 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?

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.