![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 2 of 2 total |
![]() |
Mon, Dec 19 2016 4:44 AM | Permanent Link |
Michael Dreher | The TSizer control has a published "control" property of type TControl, and in the object inspector I can select from a combobox any control of the active form. Now I want to use this control selection in my component:
type TMyClass = class(TComponent) private FSourceControl : TControl; public // ... published property SourceControl : TControl read FSourceControl write FSourceControl; end; But then after a library/rebuild in the object inspector I see something like this: [+] SourceControl | (TControl) The [+] on the left is some sort of tree expansion button and on the right there is no combobox but a readonly text "(TControl)". Is there somthing wrong in my code. What do I have to do to get the combobox here? Michael Dreher |
Mon, Dec 19 2016 3:54 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Michael,
<< But then after a library/rebuild in the object inspector I see something like this: [+] SourceControl | (TControl) The [+] on the left is some sort of tree expansion button and on the right there is no combobox but a readonly text "(TControl)". Is there somthing wrong in my code. What do I have to do to get the combobox here? >> Yes, this is one of the unmentioned finer points of component development in EWB. What you want is the "reference" keyword, which tells the IDE that you're using a reference, as opposed to an embedded control that requires its own component editor: type TMyClass = class(TComponent) private FSourceControl : TControl; public // ... published property SourceControl : TControl read FSourceControl write FSourceControl reference; end; You can see this "in action" in the WebCtrls unit for the TBindableControl and TDataSet references. Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Sunday, March 26, 2023 at 04:50 AM | Privacy Policy![]() © 2023 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |