How to Change CB Button visibility at runtime? |
Post Reply |
Author | |
shipwreck
Senior Member Joined: 18 April 2008 Location: United States Status: Offline Points: 308 |
Post Options
Thanks(0)
Posted: 17 September 2010 at 11:09pm |
Hello fellow developers! Unfortunately, I'm stuck again.
As you know, I've been working on a project, and I had the reload/stop button combined using actions. So here's my question: Is there anyway I can put a "Go" button in with the three of those, and have it only appear when the text in the combo box I'm using is not the Web browser control's location URL and to have it switch back to reload when the text is the same as the location URL? I'm assuming this has something to do with the commandbars_update() function but I'm not entirely sure. If there isn't a way to work that out, I'll settle with just being able to have the separate go button, and have it only appear and disappear under the same circumstances. Is there anyway I could possibly pull either of these off? If so, then how? Some code or a sample project would be absolutely great. Thanks in advance everyone!
|
|
Product: Xtreme Suite Pro (Active-X), Version 15.3.1
Platform: Windows 7 Ultimate SP1 (64Bit) & Windows XP Mode SP3 (32Bit) Language: Visual Basic 6.0 SP6 |
|
Xander75
Senior Member Joined: 26 April 2007 Status: Offline Points: 353 |
Post Options
Thanks(0)
|
Hi,
I believe from reading your post you want to hide/show a button on a CommandBar Toolbar at runtime? To do this, use the following code:
I have tested this in the Samples provided by CJ and it works fine. |
|
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6) |
|
Hemesh
Senior Member Joined: 10 August 2010 Status: Offline Points: 135 |
Post Options
Thanks(0)
|
As an alternative to hiding/showing buttons, you could have this as a UserControl to behave in this way, then just add that to the CommandBar?
|
|
Product: Xtreme SuitePro (ActiveX) version 18.5.0
Platform: Windows 7 Enterprise (64-bit) Language: Visual Basic 6.0 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |