G
Guest
Hi!
I think I've found a bug in the way code gets generated for an extender
provider property.
My extender provider is to provide a control to another control, that, when
clicked, will pop up a FolderBrowser and set the first control's text to the
selected folder.
Basically this means bringing textboxes and buttons together by defining
which button to click to select a path displayed in a text box.
That's my ProvidePropertyAttribute:
[ProvideProperty("BrowseButton", typeof(Control))]
Everything works OK as long as extendee and BrowseButton (the property
provided) aren't the same object.
When I try to set a control to be its own BrowseButton (in this example, a
linkLabel), I get this bad code generated:
this.folderBrowserExtenderProvider1.SetBrowseButton(this.linkLabel1,
this.folderBrowserExtenderProvider1.SetBrowseButton);
instead of
this.folderBrowserExtenderProvider1.SetBrowseButton(this.linkLabel1,
this.linkLabel1);
When I add the correct call to SetBrowseButton() to code manually,
everything works as expected, but selecting the control in the designer
always produces the bogus code above.
Can anybody help? What can I do?
Thanks in advance,
Martin Müller
I think I've found a bug in the way code gets generated for an extender
provider property.
My extender provider is to provide a control to another control, that, when
clicked, will pop up a FolderBrowser and set the first control's text to the
selected folder.
Basically this means bringing textboxes and buttons together by defining
which button to click to select a path displayed in a text box.
That's my ProvidePropertyAttribute:
[ProvideProperty("BrowseButton", typeof(Control))]
Everything works OK as long as extendee and BrowseButton (the property
provided) aren't the same object.
When I try to set a control to be its own BrowseButton (in this example, a
linkLabel), I get this bad code generated:
this.folderBrowserExtenderProvider1.SetBrowseButton(this.linkLabel1,
this.folderBrowserExtenderProvider1.SetBrowseButton);
instead of
this.folderBrowserExtenderProvider1.SetBrowseButton(this.linkLabel1,
this.linkLabel1);
When I add the correct call to SetBrowseButton() to code manually,
everything works as expected, but selecting the control in the designer
always produces the bogus code above.
Can anybody help? What can I do?
Thanks in advance,
Martin Müller