473,326 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Visually Editing Panels and DesignerAttributes

I've just started working with some people that have an odd setup and
I'm wondering if someone can point out a better way of doing things (or
what I'm doing wrong).

They have a base form class, derived from the standard Form, but with
the ability to show a list of panels in order.

Each of these panels is a subclass of a subclass of Panel. The initial
subclass is tweaked to work with the special form and then each
subclass of that is what will actually be displayed on the special
form.

This all works fine, but because there is no visual editor for panels
in VS.NET they've taken to going into the panel code, changing the
superclass from PanelSpecial to Form, editing the form visually and
then changing the superclass back to PanelSpecial again.

I'm fairly new to C#, but some digging around made me think that
putting this attribute into the PanelSpecial class would mean that the
subclasses could be edited as if they were forms (without all that
tedious setting/resetting of the superclass).

[Designer("System.Windows.Forms.Design.DocumentDesi gner,
System.Windows.Forms.Design.DLL",
typeof(IRootDesigner)),
DesignerCategory("Form")]

However this doesn't work at all (I get an "unable to find a designer"
error), although by playing around with it I've been able to make it
display the component editing designer but this isn't actually very
useful.

Can anyone suggest either a way to make the visual editing of panels
work ok, or an alternative architecture which would allow GUI editing?

Thanks,

Andy D

Nov 16 '05 #1
1 1966
They should create a subclass of UserControl, place a Panel on it, and then
add their special code from there. You can graphically design UserControls.

JIM
"AndrewDucker" <an****@ducker.org.uk> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I've just started working with some people that have an odd setup and
I'm wondering if someone can point out a better way of doing things (or
what I'm doing wrong).

They have a base form class, derived from the standard Form, but with
the ability to show a list of panels in order.

Each of these panels is a subclass of a subclass of Panel. The initial
subclass is tweaked to work with the special form and then each
subclass of that is what will actually be displayed on the special
form.

This all works fine, but because there is no visual editor for panels
in VS.NET they've taken to going into the panel code, changing the
superclass from PanelSpecial to Form, editing the form visually and
then changing the superclass back to PanelSpecial again.

I'm fairly new to C#, but some digging around made me think that
putting this attribute into the PanelSpecial class would mean that the
subclasses could be edited as if they were forms (without all that
tedious setting/resetting of the superclass).

[Designer("System.Windows.Forms.Design.DocumentDesi gner,
System.Windows.Forms.Design.DLL",
typeof(IRootDesigner)),
DesignerCategory("Form")]

However this doesn't work at all (I get an "unable to find a designer"
error), although by playing around with it I've been able to make it
display the component editing designer but this isn't actually very
useful.

Can anyone suggest either a way to make the visual editing of panels
work ok, or an alternative architecture which would allow GUI editing?

Thanks,

Andy D

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: PZ | last post by:
OSS 2005 The First International Conference on Open Source Systems Genova, July 11 - 15, 2005 CALL FOR PANELS http://oss2005.case.unibz.it Submissions of panels are solicited for the "First...
1
by: pfnus | last post by:
Hi, I want to display different forms when the buttons are clicked and all the forms are having different controls on it. So instead of adding new windows forms to the project, i enlarged the...
2
by: Garry Jones | last post by:
I asked this earlier and received a tip of going to Joomla. Problem is according to the gurus in their forums I need to rewrite the entire site so that Joomla becomes the core. As I am on 700+...
1
by: Ben | last post by:
Hi We have a number of Panels on our windows form, we have controls inside and outside of the panels. I am having problems tabbing between controls, it appers to be when the controls are...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.