Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - .NET & FindControl
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

.NET & FindControl

 Post Reply Post Reply
Author
Message
SBK2K View Drop Down
Newbie
Newbie


Joined: 04 October 2005
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote SBK2K Quote  Post ReplyReply Direct Link To This Post Topic: .NET & FindControl
    Posted: 04 October 2005 at 9:22pm

Hi,

I'm currently evaluating the Xtreme Suite to determine if I want to start using it in my programs.

I've hit a problem I can't work out with .NET. I'm using C# and I want to disable one of the tools in the toolbar and in a menu.

I've tried using CommandBars.FindControl([toolid]).Enabled = false;

And that just disables the first tool... using the other prototype for FindControl

Public Function FindControl( _
   Optional ByVal Type As Variant, _
   ByVal Id As Long, _
   Optional ByVal Visible As Variant, _
   Optional ByVal Recursive As Variant)

As follows:

CommandBars.FindControl(null, [toolid], null, true);

Still disables the tool, but only the first tool (i.e. it doesn't recurse). What am I doing wrong?

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: 05 October 2005 at 12:05am

recurse mean that it try to search it in all toolbars and menus., but can return only one control.

Please use Update event to Enable/Disable controls.

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.125 seconds.