leandroavila74 Posted June 1, 2011 Posted June 1, 2011 Hello Farshad, need a help, a kind of step by step how to create components that inherit from the current framework. I tried to do something simple that works perfectly in the Delphi VCL but I know that is different in a UNIGUI and would like to help if possible. because the code below does not work? Leandro ================================================== unit UniPictureGallery; interface uses SysUtils, Classes, Controls, uniGUIBaseClasses, uniGUIClasses, uniGUITypes, uniPanel, Graphics; type TUniPictureGallery = class(TUniPanel) PanelRight : TUniPanel; PanelLeft : TUniPanel; private protected public constructor Create(AOwner: TComponent); override; published end; procedure Register; implementation procedure Register; begin RegisterComponents('uniGUI Extended', [TUniPictureGallery]); end; { TUniPictureGallery } constructor TUniPictureGallery.Create(AOwner: TComponent); begin inherited Create(AOwner); PanelRight:=TUniPanel.Create(self); PanelRight.Width:=100; PanelRight.Align := alRight; PanelRight.Parent := Self; PanelLeft:=TUniPanel.Create(self); PanelLeft.Width:=100; PanelLeft.Align := alLeft; PanelLeft.Parent := Self; end; end. Quote
Administrators Farshad Mohajeri Posted June 1, 2011 Administrators Posted June 1, 2011 1st question: uniGUI version? Quote
leandroavila74 Posted June 1, 2011 Author Posted June 1, 2011 1st question: uniGUI version? I'm using the version 0.85.0.862 I made a change and apparently ran into runtime but in so he does not draw the design that draws on runtime ============================================================= constructor TUniPictureGallery.Create(AOwner: TComponent); begin inherited Create(AOwner); PanelRight:=TUniPanel.Create(self); PanelRight.Width:=100; PanelRight.Align := alRight; PanelRight.Parent := Self; PanelRight.Color := clwhite; InsertControl(PanelRight); PanelLeft:=TUniPanel.Create(self); PanelLeft.Width:=100; PanelLeft.Align := alLeft; PanelLeft.Parent := Self; PanelLeft.Color := clyellow; InsertControl(PanelLeft); end; Quote
Administrators Farshad Mohajeri Posted June 1, 2011 Administrators Posted June 1, 2011 OK I'm looking into issue. Quote
Administrators Farshad Mohajeri Posted June 1, 2011 Administrators Posted June 1, 2011 OK I'm looking into issue. Both issues will be fixed in next build. Thx. Quote
leandroavila74 Posted June 1, 2011 Author Posted June 1, 2011 Both issues will be fixed in next build. Thx. Thx, good work! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.