![]() |
Need help |
Post Reply
|
| Author | |
San0k
Groupie
Joined: 06 February 2008 Location: Ukraine Status: Offline Points: 48 |
Post Options
Thanks(0)
Quote Reply
Topic: Need helpPosted: 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 |
Post Options
Thanks(0)
Quote Reply
Posted: 26 February 2008 at 4:20am |
|
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 |
Post Options
Thanks(0)
Quote Reply
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.
|
|
![]() |
|
San0k
Groupie
Joined: 06 February 2008 Location: Ukraine Status: Offline Points: 48 |
Post Options
Thanks(0)
Quote Reply
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. |
|
![]() |
|
Aaron
Senior Member
Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
Quote Reply
Posted: 26 February 2008 at 9:46am |
|
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 |
Post Options
Thanks(0)
Quote Reply
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.
|
|
![]() |
|
San0k
Groupie
Joined: 06 February 2008 Location: Ukraine Status: Offline Points: 48 |
Post Options
Thanks(0)
Quote Reply
Posted: 28 March 2008 at 9:26am |
|
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 |