![]() |
Need help |
Post Reply ![]() |
Author | |
San0k ![]() Groupie ![]() Joined: 06 February 2008 Location: Ukraine Status: Offline Points: 48 |
![]() ![]() ![]() ![]() ![]() 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? |
|
![]() |
|
San0k ![]() Groupie ![]() Joined: 06 February 2008 Location: Ukraine Status: Offline Points: 48 |
![]() ![]() ![]() ![]() ![]() |
But!
If I drag toolbar with TreeView outside docking area of CommandBar then TreeView becomes visible. |
|
![]() |
|
Aaron ![]() Senior Member ![]() Joined: 29 January 2008 Status: Offline Points: 2192 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
![]() |
|
San0k ![]() Groupie ![]() Joined: 06 February 2008 Location: Ukraine Status: Offline Points: 48 |
![]() ![]() ![]() ![]() ![]() |
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. |
|
![]() |
|
Aaron ![]() Senior Member ![]() Joined: 29 January 2008 Status: Offline Points: 2192 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Maybe thats why you have to use a picturebox. Did you use one or not?
|
|
![]() |
|
Baldur ![]() Senior Member ![]() Joined: 22 November 2006 Location: Germany Status: Offline Points: 244 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
![]() |
|
San0k ![]() Groupie ![]() Joined: 06 February 2008 Location: Ukraine Status: Offline Points: 48 |
![]() ![]() ![]() ![]() ![]() |
Thank you, guys! Got it!
![]() |
|
![]() |
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 |