473,326 Members | 2,048 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.

Problems wirh customized Property Grid

Hi,

I want to customize a Property Grid in the following way:

The Property Grid should show a property which value should be changed
by a dropdown-listbox.

For example, there is a property called "animal" and when I want to
change the value of the property in the property grid it should show
me a dropdown-box with standard values like "cow","cat" or "bird".

In general it is not a problem. I created a new class
TStringConverterAnimal deriving from StringConverter which provides a
method StandardValuesCollection*
GetStandardValues(ITypeDescriptorContext* context). The
StandardValueCollection then contains the standard values "cow","cat"
and "bird".

This works fine - the property grid shows me a drop down - box with
the standard values.

Now my problem:

I want to show a small picture of the animal at the left side of
_every_
standard value in the dropdown-list.

My first idea was, that I create a class TAnimalPropertyEditor
deriving from
UITypeEditor. In this class I override the method
PaintValue(PaintValueEventArgs *pe), compare the String pe->Value with
the names of my animals and then I draw the picture of the animal with
pe->Graphics->... .

The problem is, that it only draws the picture of the animal beside
the first value in the dropdown-box. On the left of the other values
I can find a small Picture too, but it is empty.

How can I solve this problem?

Thanks and greetings

Andreas Poller
--
Andreas Poller
Student der TU Chemnitz
Fakultät für Informatik
Nov 17 '05 #1
0 1100

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

Similar topics

0
by: jblazi | last post by:
The Python mode for Emacs works nicely on my own machine but it does not work entirely correctly in my school. We use a Novell network and that may cause some problems. Shen I am editing a Python...
2
by: Pete Davis | last post by:
I have a Windows Forms datagrid with the datasource set to an ArrayList. The ArrayList is initially empty. I have DataGridColumn styles defined for 4 columns with widths, header titles, and...
2
by: Brian | last post by:
NOTE ALSO POSTED IN microsoft.public.dotnet.framework.aspnet.buildingcontrols I have solved most of my Server Control Collection property issues. I wrote an HTML page that describes all of the...
3
by: wolfgang.lipp | last post by:
some time after posting my `Linkdict recipe`__ to aspn__ -- basically, a dictionary with run-time delegational lookup, but this is not important here -- i thought gee that would be fun to make...
3
by: Richard Ryerson | last post by:
I have a general DataGridComboBoxColumn that I built using the Example in the .NET 2003 Combined Collection help file (that was a data time picker). I am able to assign a data source and display...
5
by: RedHair | last post by:
I have a ASP.NET 2.0 web page which inherits a customized base page class and have a master page, their relation is as below Customized base page class --> web page --> master page How to...
8
by: colin | last post by:
Hi, I thought I could use the property grid to nicly edit some of my data, however it seems to require each field to be a property, wich I didnt realise was implied in the name of it lol. Is...
1
by: asharda | last post by:
I have a custom property grid. I am using custom property grid as I do not want the error messages that the propertygrid shows when abphabets are entered in interger fields. The custom property...
10
by: Derek Hart | last post by:
I can set focus to my property grid by using propgrid.Focus - but how can I set the default property that is always first? Or just set focus to the default property? Can this be done?
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
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...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.