Print Page | Close Window

Need help

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=9705
Printed Date: 08 October 2024 at 6:40am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Need help
Posted By: San0k
Subject: Need help
Date Posted: 26 February 2008 at 3:45am
Hello,

I need help with CommandBarControlCustom.
I try to create TreeView in ToolBar. But my ToolBar is clear :(

My code snip:

            CommandBarControlCustom customControl = (CommandBarControlCustom)_treeBar.Controls.Add(XTPControlType.xtpControlCustom, ControlsHelper.GetNextControlId(), "", false, false);

            _tree = new TreeView();
            _tree.CreateControl();
            _tree.Width = 200;
            _tree.Height = 400;
            _tree.Visible = true;

            customControl.Handle = _tree.Handle.ToInt32();


Where my error?



Replies:
Posted By: San0k
Date Posted: 26 February 2008 at 4:20am
But!
If I drag toolbar with TreeView outside docking area of CommandBar then TreeView becomes visible.


Posted By: Aaron
Date Posted: 26 February 2008 at 7:30am

Hi,

I'm not really into .NET but maybe this will help.
 
I think you have to create a picturebox first and put the treeview in that picturebox. Attach the handle of custom to picturebox hwnd. You will have problems with most controls if you don't use a picturebox.
 
Maybe there will be another member who will help you with the code when things don't work out as should.


Posted By: San0k
Date Posted: 26 February 2008 at 8:31am
IMHO This problem in ToolBar logic.
My TreeView are not visible only if docked at left or right side.
My code in frist post is correct.


Posted By: Aaron
Date Posted: 26 February 2008 at 9:46am
Hi,
 
Maybe thats why you have to use a picturebox. Did you use one or not?


Posted By: Baldur
Date Posted: 27 March 2008 at 12:57pm
At top and bottom, the heigth of the toolbar is too small to show the tree.
Normally, the toolbar has only button-height.
 
Use a dropdown-button and add the treeview as dropdown.


Posted By: San0k
Date Posted: 28 March 2008 at 9:26am
Thank you, guys! Got it!



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