TheSwamp

Code Red => .NET => Topic started by: MickD on June 30, 2008, 11:00:33 PM

Title: Textbox on toolbar
Post by: MickD on June 30, 2008, 11:00:33 PM
Does anyone have an example of putting a textbox control on a toolbar with C#? I noticed the 'custom' control type, has anyone had a play with these yet?

What I need is a text box for the user to set a value and have it available to view all the time or change as required.
thanks,
Mick.
Title: Re: Textbox on toolbar
Post by: Glenn R on July 01, 2008, 06:12:58 AM
Are you talking about an AutoCAD toolbar or a 'normal' windows toolbar Mick?
Title: Re: Textbox on toolbar
Post by: MickD on July 01, 2008, 05:57:33 PM
Sorry 'bout that, it would be an acad toolbar, I just need to have standard text box controls to store and display data. I found the cui example in the sdk, I'll have a better look at it today and try and get something started, thanks Glenn.
Title: Re: Textbox on toolbar
Post by: Glenn R on July 02, 2008, 05:38:28 PM
I'm interested to hear what you find Mick, as I thought these weren't possible...just like combos were not...unless you embedded the adesk one for layer for instance, which from memory you just specified as a 'menu id' in your own toolbar and acad would just automagically add it to yours...
Title: Re: Textbox on toolbar
Post by: Chumplybum on July 02, 2008, 06:45:02 PM
found this article on adn, http://adn.autodesk.com/adn/servlet/devnote?siteID=4814862&id=6853598&linkID=4900509

a little over my head though...
Title: Re: Textbox on toolbar
Post by: MickD on July 02, 2008, 10:07:15 PM
Thanks Chumplybum, I can't get in though...not a member as such. (or the link'site is down??).

Glenn, you're right, as long as you're adding a predefined control it's going to be hard work. I tried deriving from the toolbarcontrol class but as you pointed out, it just grabs a predefined control which I can't add to the control type enum's.
Looks like I might have to go win32 or MFC.