Print Page | Close Window

Null argument exception with TabWorkspace in C#

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=17716
Printed Date: 23 November 2024 at 2:56pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Null argument exception with TabWorkspace in C#
Posted By: bjust
Subject: Null argument exception with TabWorkspace in C#
Date Posted: 22 December 2010 at 4:59pm
I am trying to use the CodeJock controls in a C# application.  When I try to set the TabWorkspace.IgnoreFlickersOnActivate property, it crashes with a null argument exception.  TabWorkspace is null.  How can I create it?  Also, in some cases the .Options property is null, but not in other cases.  What's going on here?

-------------
Brian Justice
Senior Developer Corepoint Health.



Replies:
Posted By: Oleg
Date Posted: 23 December 2010 at 9:03am
Hi,

Do you call CommandBars.SetMDIClient ?


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


Posted By: bjust
Date Posted: 27 December 2010 at 11:33am
Calling SetMDIClient fixed the problem where the .TabWorkspace property was null on the MDI container.  However, I still have the problem on the MDI child windows where the .Options property - and others - are null.  Calling SetMDIClient didn't help.

-------------
Brian Justice
Senior Developer Corepoint Health.


Posted By: bjust
Date Posted: 28 December 2010 at 10:23am
I figured out what the problem was.  I read some other forum articles and discovered that I need to initialize the control after setting the MDIParent property, not before.  It works now.

-------------
Brian Justice
Senior Developer Corepoint Health.



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