Hi Axel,
You can create your own TreeView easily, but it may not always pop up in the
ToolBox, especially if you have lot of third party controls already in the
ToolBox.
Make sure Tools->Windows Forms Designer->General->Autopopulate ToolBox is
set to true (remember to restart the solution if you change the setting). If
you still have problems seeing the control (PS! controls should be in the
toolbox in a group called "<project> components") you may have to add a
regular TreeView and change the class in the designer.cs file.
Its a bit unclear what you mean by "I can't drag this new class onto a Form
or store it in the Toolbox." Can you elaborate?
--
Happy Coding!
Morten Wennevik [C# MVP]
[quoted text, click to view] "Axel Dahmen" wrote:
> Hi,
>
> I'd like to create a specialized version of System.Windows.Forms.TreeView.
> But creating a class and deriving from TreeView doesn't work. I can't drag
> this new class onto a Form or store it in the Toolbox.
>
> What am I doing wrong here? How can I derive from TreeView and have all
> the Visual Studio Designer features?
>
> TIA,
> Axel Dahmen
Thanks, Jack and Morten!
Going through your tips I've found the reason why it didn't work =
yesterday. I forgot to declare my class as "public"....
I found your tips - particularly the "toolbox group called <project> =
components tip - very valuable.
Thanks a lot! And best regards,
Axel Dahmen
--------------------------------
"Morten Wennevik [C# MVP]" <MortenWennevik@hotmail.com> schrieb im =
Newsbeitrag news:E1C54307-C45A-46F4-A82A-2D01E3F1F2E0@microsoft.com...
[quoted text, click to view] > Hi Axel,
>=20
> You can create your own TreeView easily, but it may not always pop up =
in the=20
> ToolBox, especially if you have lot of third party controls already in =
the=20
> ToolBox.
>=20
> Make sure Tools->Windows Forms Designer->General->Autopopulate ToolBox =
is=20
> set to true (remember to restart the solution if you change the =
setting). If=20
> you still have problems seeing the control (PS! controls should be in =
the=20
> toolbox in a group called "<project> components") you may have to add =
a=20
> regular TreeView and change the class in the designer.cs file.
>=20
> Its a bit unclear what you mean by "I can't drag this new class onto a =
Form=20
> or store it in the Toolbox." Can you elaborate?
>=20
> --=20
> Happy Coding!
> Morten Wennevik [C# MVP]
>=20
>=20
> "Axel Dahmen" wrote:
>=20
>> Hi,
>>=20
>> I'd like to create a specialized version of =
System.Windows.Forms.TreeView.
>> But creating a class and deriving from TreeView doesn't work. I can't =
drag
>> this new class onto a Form or store it in the Toolbox.
>>=20
>> What am I doing wrong here? How can I derive from TreeView and have =
all
>> the Visual Studio Designer features?
>>=20
>> TIA,
>> Axel Dahmen
Hi,
I'd like to create a specialized version of =
System.Windows.Forms.TreeView. But creating a class and deriving from =
TreeView doesn't work. I can't drag this new class onto a Form or store =
it in the Toolbox.
What am I doing wrong here? How can I derive from TreeView and have all =
the Visual Studio Designer features?
TIA,
Axel Dahmen
Don't see what you're looking for? Try a search.