p2rcoder Posted September 20, 2017 Share Posted September 20, 2017 last trial I have form with tree and options panel. On options panel I show different frames which depends on selected node. I crated CustomFrame and several another frames inherited from custom. When I try to create frame I get error https://www.screencast.com/t/2gHWz5Mw35z code: procedure TfrmQuadMagic.SetTaskFrame; var task_code: string; begin task_code := quTask.FieldByName('rtl_task_code').AsString; if Assigned(FOptionsFrame) then FOptionsFrame.Free; if task_code = 'PRODIMP' then FOptionsFrame := TQMImportProductOptionFrame.Create(pnlOptions); <-- error here if Assigned(FOptionsFrame) then FOptionsFrame.SetOptions(quTask.FieldByName('rtl_options').AsString) else FOptionsFrame := TQMCustomOptionFrame.Create(pnlFrameOptions); end; This happened only when TuniCombobox at frame. When I deleted it and added only TuniMemo - frame created without error, but it doesn't show.... FOptionsFrame := TQMImportProductOptionFrame.Create(pnlFrameOptions); FOptionsFrame.Show; not visible after that Link to comment Share on other sites More sharing options...
p2rcoder Posted September 20, 2017 Author Share Posted September 20, 2017 ok, there is no error after change TFrame to TUniFrame but stil dont visible after .Show Link to comment Share on other sites More sharing options...
p2rcoder Posted September 20, 2017 Author Share Posted September 20, 2017 ok, I changed UniPanel to UniContainerPanel and code to FOptionsFrame := TQMImportProductOptionFrame.Create(self); FOptionsFrame.Parent := pnlOptions; FOptionsFrame.Align := alClient; FOptionsFrame.Show; now frames became visible Link to comment Share on other sites More sharing options...
erich.wanker Posted September 20, 2017 Share Posted September 20, 2017 just a solution - what works for me: FCurrentFrame1 : TuniFrame; ... if task_code = 'PRODIMP' then begin FCurrentFrame1:=TUniFrameClass(FindClass('TQMImportProductOptionFrame')).Create(self); FCurrentFrame1.Align:=alClient; FCurrentFrame1.Parent:=:=display; //uniscrollbox1; . i allways use a uniscrollbox for better UserInterface things .... in MainForm.pas dont forget: initialization RegisterAppFormClass(TMainForm); RegisterClasses([ TQMImportProductOptionFrame, .... Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now