Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Need help
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Need help

 Post Reply Post Reply
Author
Message
San0k View Drop Down
Groupie
Groupie


Joined: 06 February 2008
Location: Ukraine
Status: Offline
Points: 48
Post Options Post Options   Thanks (0) Thanks(0)   Quote San0k Quote  Post ReplyReply Direct Link To This Post Topic: Need help
    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?
Back to Top
San0k View Drop Down
Groupie
Groupie


Joined: 06 February 2008
Location: Ukraine
Status: Offline
Points: 48
Post Options Post Options   Thanks (0) Thanks(0)   Quote San0k Quote  Post ReplyReply Direct Link To This Post Posted: 26 February 2008 at 4:20am
But!
If I drag toolbar with TreeView outside docking area of CommandBar then TreeView becomes visible.
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
San0k View Drop Down
Groupie
Groupie


Joined: 06 February 2008
Location: Ukraine
Status: Offline
Points: 48
Post Options Post Options   Thanks (0) Thanks(0)   Quote San0k Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 26 February 2008 at 9:46am
Hi,
 
Maybe thats why you have to use a picturebox. Did you use one or not?
Back to Top
Baldur View Drop Down
Senior Member
Senior Member


Joined: 22 November 2006
Location: Germany
Status: Offline
Points: 244
Post Options Post Options   Thanks (0) Thanks(0)   Quote Baldur Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
San0k View Drop Down
Groupie
Groupie


Joined: 06 February 2008
Location: Ukraine
Status: Offline
Points: 48
Post Options Post Options   Thanks (0) Thanks(0)   Quote San0k Quote  Post ReplyReply Direct Link To This Post Posted: 28 March 2008 at 9:26am
Thank you, guys! Got it!
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.203 seconds.