Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
| Search | Today's Posts | Mark Forums Read
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 3rd, 2006, 11:26 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Copenhagen, , Denmark.
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default Generic Image structure working design-time, how?

I am about to tear out the remaining and very limited hair on my head, trying to figure out how to make a generic structure to hold images and which can be edited design-time. I thought that this was a triviel task, but...

Well, initially I wanted to make a List<Image> (and still do) but problems came when I wanted to add images to the list design-time. This since Image is an abstract class. How do I do this?

I have read about UI Editors, but I cannot seem to make anything work. The functionality I expect design-time resembles how ImageList work on e.g. Button. If you know how can you please help me out and help me save the last hair on my head.

Thanks, Jacob.
__________________
Danish audio books for download at http://www.lytenbog.dk (Danske lydbøger til download).
 
Old March 6th, 2006, 10:57 AM
Authorized User
 
Join Date: Mar 2006
Location: , , .
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey Jacob,

A quick suggestion (which I have not tried out yet) is to use bitmap list (List<Bitmap>). The Bitmap class is not abstract, as far as I know.

I will try to work more on this when I get some time. Meanwhile, let me know if you had any success.

Sreeram

PS: Easy on the hair on your head. We will figure a way out of this.
 
Old March 6th, 2006, 04:24 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Copenhagen, , Denmark.
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey, thanks for your suggestion.

I tried it out earlier, but the problem about Bitmap is that there is no default constructor, and it can therefore not create an instance (AFAIK) from the designer. You know, when clicking the 'Add' button in the dialog that pops up when trying to add images through the property grid.

I am still very much interested in a solution to this problem. Thanks, Jacob.
 
Old March 6th, 2006, 05:28 PM
Authorized User
 
Join Date: Mar 2006
Location: , , .
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ah! I see.. I think I had not understood your problem correctly. My bad.

I will try to work more on this and will get back to you.

Sreeram




Similar Threads
Thread Thread Starter Forum Replies Last Post
Resizing in Design Time Farside Visual Studio 2005 1 August 9th, 2007 06:42 PM
database design issue - generic vs performance elysian Oracle 0 March 27th, 2007 04:34 AM
Loop capturing image and generic error occured in labby C# 2005 0 December 22nd, 2006 02:55 AM
Design-Time or Run-Time now ? ALGNET .NET Framework 2.0 1 July 31st, 2006 04:43 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.