all groups > dotnet windows forms designtime > january 2005 >
You're in the

dotnet windows forms designtime

group:

Use the Designer of a Windows Control for a Component


Use the Designer of a Windows Control for a Component micha NO[at]SPAM nospam.com
1/30/2005 1:39:51 PM
dotnet windows forms designtime: Hello

I want to build a own set of Forms and Controls that are
not inherited from the "Windows.Forms." stuff and only are inherited from
Component.

Some thing like the Shape Designer sample found at.
http://www.windowsforms.net/articles/shapedesigner.aspx

But I do not want to Build all the Designer stuff myself because there
are so many little things (like mutli selection etc) that the Shape Designer
forget
and the Shapedeisgner is not always working properly.

I instead want to use the Designtime behaviour of the Windows Forms stuff.

My Button Control for example looks something like this:

public Class MyButton
inherits Component

public windowsButton as Windows.Forms.Button

sub new()
if designtime then
windowsButton = new Windows.Forms.Button
end if
end sub

....

My Own Properties

End Class


I want to have the Look and Feel of the Windows Forms at Designtime
but not want that my Controls are inherited from "Windows.Forms.*"
at runtime.

Any Idea how to do this ?
















Re: Use the Designer of a Windows Control for a Component joeycalisay
1/31/2005 2:36:53 PM
All .NET controls under Windows.Forms assembly derive from Component. They
are special kind of components because they have visual representation on
the document surface. If you want your custom controls to be inheriting
from Component only, I believe you will have to deal with their appearances
(just like the shapedesigner components) unlike inheriting from .NET widgets
where their appearances are already available and customizable.

First of all, I would like to know why you need to attain this, perhaps
you're confused on what you want/need to do...

--
Joey Calisay
http://spaces.msn.com/members/joeycalisay/


[quoted text, click to view]

Re: Use the Designer of a Windows Control for a Component micha NO[at]SPAM nospam.com
1/31/2005 5:54:36 PM
Hey Joey

It's not easy to explain, but it's the same Problem as if you like to
create Forms and Controls that Work under Windows and Linux/Unix or Web the
same time.

To Create Controls/Forms that run under Linux or any Plattform or Device
you can not use Windows.Forms.*.

You have to use Plattform dependent Assemblies.

So I have to Develop the GUI for every Plattform and doing things twice or
triple.

So why not have one Set of Controls for all.

A Button looks and Felels the same under Windows, Web Linux.
It has Left/Top/Visible Text etc Properties and looks always like a Button.

I want to write the GUI and Code and don't want to care about the Platform
or the "Device"
on which it will run later.

[quoted text, click to view]

What do you mean with Widgets ?

Do you mean it as an other Word for the Windows.Forms.* Classes
or is there a Sample out there which is calles "Widgets"

If yes, can you send me the link for this sample ?

Thanx for your help
Micha




[quoted text, click to view]

Re: Use the Designer of a Windows Control for a Component joeycalisay
2/1/2005 5:46:49 PM
Widgets - another term for controls...

This is kind of complicated for me since it involves the Linux platform.
Anyway, if you haven't read about Mono for Linux, try to search on it since
it is doing WinForm counterparts in Linux (I believe so...)

--
Joey Calisay
http://spaces.msn.com/members/joeycalisay/


[quoted text, click to view]

AddThis Social Bookmark Button