Never find the need to use Frames, and now that I want to use it I have the feeling im over complicating things :?
The idea is to have a datalist that is imbedded in one of the forms and also allow the option to separate it so it will be in a stand alone window.
So I create a Frame with all the GUI elements I wanted and I included it inside the main app Form and in a new Form. To control the data I used the following code:
What do you think, do you have a better idea for solving this issue?Code:TMyFrame = Class(TFrame) Controller: TController end; TMyFrame.Add(S: String) Controller.Add(S) end; TMyFrame.OnControllerChangeEvent Repaint; end; ... TController.Add(S: String) DB.Add(S) NotifyAllMembers(OnControllerChangeEvent) end;
Note that in this case I won't mind having only 1 "copy" of the window, maybe I should make is as a dockable form..? had bad experience with that...
Bookmarks