My current project requires me to create a custom control to provide a required 'look and feel' to the data entry forms.
This look and feel involves having a control that appears to be a standard TEdit when it has not got the focus, but on receiving focus changes to a standard ComboBox! I have not done any custom control programming before. I have started with deriving from TCustomEdit and adding a private TComboBox field. I have then tried to expose the Items property (using Getter/Setter routines) I get an error message telling me that the control has no parent window. I have tried assigning the parent in the constructor, but no good. Below is the Constructor code plus the Getter/Setters: constructor TtwsEditCombo.Create(Owner: TComponent); begin inherited Create (Owner); fCombo := TComboBox.Create(Self); fCombo.ParentWindow := Self.ParentWindow; end; function TtwsEditCombo.GetItemIndex: Integer; begin Result := fCombo.ItemIndex; end; function TtwsEditCombo.GetItems: TStrings; begin Result := fCombo.Items; end; procedure TtwsEditCombo.SetItemIndex(const Value: integer); begin fCombo.ItemIndex := Value; end; procedure TtwsEditCombo.SetItems(const Value: TStrings); begin fCombo.Items := Value; end; Any pointers would be most gratefully received. Paul. Experience is something you don't get until just after you need it. -- _______________________________________________ Surf the Web in a faster, safer and easier way: Download Opera 8 at http://www.opera.com Powered by Outblaze ------------------------ Yahoo! Groups Sponsor --------------------~--> Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/i7folB/TM --------------------------------------------------------------------~-> ----------------------------------------------------- Home page: http://groups.yahoo.com/group/delphi-en/ To unsubscribe: [EMAIL PROTECTED] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/delphi-en/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

