Click here to Skip to main content
15,898,222 members
Home / Discussions / C#
   

C#

 
QuestionToolStripSeperator to a ToolStripMenuItem Pin
Gareth H26-Feb-07 5:26
Gareth H26-Feb-07 5:26 
AnswerRe: ToolStripSeperator to a ToolStripMenuItem Pin
Stefan Troschuetz26-Feb-07 6:22
Stefan Troschuetz26-Feb-07 6:22 
GeneralRe: ToolStripSeperator to a ToolStripMenuItem Pin
Gareth H26-Feb-07 21:51
Gareth H26-Feb-07 21:51 
AnswerRe: ToolStripSeperator to a ToolStripMenuItem Pin
Sven Cipido26-Feb-07 21:03
Sven Cipido26-Feb-07 21:03 
AnswerRe: connection based game server loses packets Pin
Judah Gabriel Himango26-Feb-07 13:36
sponsorJudah Gabriel Himango26-Feb-07 13:36 
Questioninclude windows explorer in c# App? Pin
jkersch26-Feb-07 4:46
jkersch26-Feb-07 4:46 
AnswerRe: include windows explorer in c# App? Pin
Stefan Troschuetz26-Feb-07 5:01
Stefan Troschuetz26-Feb-07 5:01 
QuestionIExtenderProvider Pin
Scott Dorman26-Feb-07 4:12
professionalScott Dorman26-Feb-07 4:12 
I am implementing a custom IExtenderProvider derived class so I can dynamically set the following properties on a control:

Required (using an ErrorProvider)
Description (ToolTip)
Errors (using an ErrorProvider)
Caption

I have everything working except for the caption. Ideally, I would like to add a Label control to the form for the given UI element. I know how to draw the label text myself, but that doesn't give me any of the accessability features that I gain when using a label.

The problem I'm running in to is that I can get the label to appear at design time but not at run time. Essentially, when I detect that a new control has been added I try to add a new label control (positioned appropriately) to the parent's Controls array. This works fine at design time but at run time the Parent property of the control I'm extending is null.

I'm trying to do this using an IExtenderProvider so I don't have to create subclassed versions of the UI controls to add a caption. In case you want the background, the project I'm working on needs to allow a dynamically rendered UI based on various pieces of meta data contained in the business object. The business object can be customized by the end-user through an admin interface, so I will never know what fields will be present and what their captions should be until it is time to actually render the screen.

Has anybody done anything similar to this? I've pretty much exhausted the information available on Google, which isn't much beyond creating a simple provider.


-----------------------------
In just two days, tomorrow will be yesterday.

AnswerRe: IExtenderProvider Pin
mike montagne26-Feb-07 14:31
mike montagne26-Feb-07 14:31 
GeneralRe: IExtenderProvider Pin
Scott Dorman26-Feb-07 14:54
professionalScott Dorman26-Feb-07 14:54 
GeneralRe: IExtenderProvider Pin
mike montagne27-Feb-07 7:20
mike montagne27-Feb-07 7:20 
GeneralRe: IExtenderProvider Pin
Scott Dorman27-Feb-07 7:41
professionalScott Dorman27-Feb-07 7:41 
GeneralRe: IExtenderProvider Pin
mike montagne27-Feb-07 8:06
mike montagne27-Feb-07 8:06 
GeneralRe: IExtenderProvider Pin
Scott Dorman27-Feb-07 8:24
professionalScott Dorman27-Feb-07 8:24 
GeneralRe: IExtenderProvider Pin
mike montagne27-Feb-07 8:35
mike montagne27-Feb-07 8:35 
GeneralRe: IExtenderProvider Pin
Scott Dorman27-Feb-07 8:08
professionalScott Dorman27-Feb-07 8:08 
GeneralRe: IExtenderProvider Pin
mike montagne27-Feb-07 8:15
mike montagne27-Feb-07 8:15 
GeneralRe: IExtenderProvider Pin
Scott Dorman27-Feb-07 8:19
professionalScott Dorman27-Feb-07 8:19 
GeneralRe: IExtenderProvider Pin
mike montagne27-Feb-07 8:44
mike montagne27-Feb-07 8:44 
GeneralRe: IExtenderProvider Pin
mike montagne27-Feb-07 8:46
mike montagne27-Feb-07 8:46 
GeneralRe: IExtenderProvider Pin
mike montagne27-Feb-07 8:55
mike montagne27-Feb-07 8:55 
GeneralRe: IExtenderProvider Pin
mike montagne27-Feb-07 8:58
mike montagne27-Feb-07 8:58 
GeneralRe: IExtenderProvider Pin
Scott Dorman1-Mar-07 15:39
professionalScott Dorman1-Mar-07 15:39 
GeneralRe: IExtenderProvider Pin
mike montagne1-Mar-07 16:25
mike montagne1-Mar-07 16:25 
GeneralRe: IExtenderProvider Pin
Scott Dorman1-Mar-07 16:58
professionalScott Dorman1-Mar-07 16:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.