Why do the old avatars remain in my old entries after being removed?
Expandable Properties Problem
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What can I do?
• What to Read?
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Зарегистрируйся!

QAIX > .Net Development > Expandable Properties Problem 12 October 2003 06:56:04

  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Moderators:

Expandable Properties Problem

Andreas HГҐkansson 12 October 2003 06:56:04
 have create a property on my winform control which returns an instance
of
a class. I have created a TypeConverter for it by deriving a new class
from the
ExpandableObjectCon­verter class. My typeconverter implements the

CanConvertFrom
ConvertFrom
ConvertTo

members.

The property shows up like it should in the property window in this form

[-] Padding 4, 4
Horizontal 4
Vertical 4

it is exposed like this

[
Browsable(true),
Category("Appearance"),

DesignerSerializationVisibility(DesignerSerializationVisibility.Content)
]
public PaddingInfo Padding
{
get { return this.paddingInfo; }
set
{
this.paddingInfo = value;
this.Invalidate();
}
}

When I change the property by altering the values in the [+] Padding 4,
4
section
of the propertygid, then my set-property is called, thus the
Invalidate()
method is called
and my method is repainted.

However, if I change either the Horizontal or Vertical sub-properties
then
the set-section
of the padding property is never called meaning the value is not
persisted
nor is the
Invalidete() method called..


The PaddingInfo class is just a simple class which exposes two get/set
properties for vertical and horizontal padding.

Any ideas how to solve this?

---
ANDREAS HГ…KANSSON
STUDENT OF SOFTWARE ENGINEERING
andreas (at) selfinflicted.org

"In a world in which we are all slaves to the laws of gravity,
I'm proud to be counted as one of the freedom fighters."


Add comment
Craig Andera 11 October 2003 16:05:47 permanent link ]
 
have create a property on my winform control which returns an instance> of> a class. I have created a TypeConverter for it by deriving a new class> from the> ExpandableObjectCon­verter class.

You might find this [1] helpful. It's my presentation from WinDev East 2002
about how to customize the VS.NET designer. Also, you're more likely to get
help on these sorts of questions over on the DOTNET-WINFORMS mailing list
[2]. I suggest you move the question over there. Good luck!

[1] http://staff.develo­p.com/candera/downlo­ads/VSFriendly.zip
[2] http://discuss.deve­lop.com/dotnet-winfo­rms.html

Add comment
Jeff Kryzer 12 October 2003 06:56:04 permanent link ]
 Andreas,

What I've done in this situation is to put an event on your PaddingInfo
class like "NeedToInvalidatePa­rent". Then in your control, subscribe to
that event. The PaddingInfo.Horizon­tal and PaddingInfo.Vertica­l property
Set routines would fire the event.

There might be other (better) ways to do this, but this works.
Jeff


-----Original Message-----
From: Discussion of development on the .NET platform using any managed
language [mailto:D­OTNET-CLR@DISCUSS.DEVELOP.COM] On Behalf Of Andreas
HГҐkansson
Sent: Saturday, October 11, 2003 5:07 AM
To: DOTNET-CLR@DISCUSS.­DEVELOP.COM
Subject: [DOTNET-CLR] Expandable Properties Problem

have create a property on my winform control which returns an instance of a
class. I have created a TypeConverter for it by deriving a new class from
the ExpandableObjectCon­verter class. My typeconverter implements the

CanConvertFrom
ConvertFrom
ConvertTo

members.

The property shows up like it should in the property window in this form

[-] Padding 4, 4
Horizontal 4
Vertical 4

it is exposed like this

[
Browsable(true),
Category("Appearance"),

DesignerSerializationVisibility(DesignerSerializationVisibility.Content)
]
public PaddingInfo Padding
{
get { return this.paddingInfo; }
set
{
this.paddingInfo = value;
this.Invalidate();
}
}

When I change the property by altering the values in the [+] Padding 4,
4
section
of the propertygid, then my set-property is called, thus the
Invalidate()
method is called
and my method is repainted.

However, if I change either the Horizontal or Vertical sub-properties then
the set-section of the padding property is never called meaning the value is
not persisted nor is the
Invalidete() method called..


The PaddingInfo class is just a simple class which exposes two get/set
properties for vertical and horizontal padding.

Any ideas how to solve this?

---
ANDREAS HГ…KANSSON
STUDENT OF SOFTWARE ENGINEERING
andreas (at) selfinflicted.org

"In a world in which we are all slaves to the laws of gravity, I'm proud to
be counted as one of the freedom fighters."


Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или УК РФ.


QAIX > .Net Development > Expandable Properties Problem 12 October 2003 06:56:04

see also:
an array question
Creating mail accounts
mod_php + oracle
пройди тесты:
see also:
Free iPod nano raffle for Christamas
Aimersoft MKV Converter v2.0.2.13
2008: Most pirated PC games

  Copyright © 2001—2008 QAIX
Idea: Miсhael Monashev
Помощь и задать вопросы можно в сообществе support.qaix.com.
Сообщения об ошибках оставляем в сообществе bugs.qaix.com.
Предложения и комментарии пишем в сообществе suggest.qaix.com.
Информация для родителей.
Write us at:
If you would like to report an abuse of our service, such as a spam message, please .