Guest Posted January 4, 2011 Share Posted January 4, 2011 Message from: "Javi" I have tried this: ///////////////////////////////////////////////// type TMainForm = class(TUniForm) ..... public UniScreen:TUniScreenMask; end; // NOT WORK procedure TMainForm.UniFormCreate(Sender: TObject); begin UniScreen := TUniScreenMask.Create(UniApplication); UniScreen.DisplayMessage := 'hola holita'; UniSCreen.AttachedControl := UniButton1; UniScreen.Enabled := True; end; // NOT WORK procedure TMainForm.Procedimiento(Sender: TObject); begin UniScreen := TUniScreenMask.Create(UniApplication); UniScreen.DisplayMessage := 'hola holita'; UniSCreen.AttachedControl := UniButton1; UniScreen.Enabled := True; end; /////////////////////////////////////////////////// But this does not work. I have also tried this: ///////////////////////////////////////////////// type TMainForm = class(TUniForm) UniScreenMask1:TUniScreenMask; end; // WORK !!! procedure TMainForm.UniFormCreate(Sender: TObject); begin UniScreenMask1.AttachedControl := UniButton1; end; // NOT WORK procedure TMainForm.Procedimiento(Sender: TObject); begin UniScreenMask1.AttachedControl := UniButton1; end; /////////////////////////////////////////////////// I think the TUniScreenMask component, it only works if it is created at design time. And it is configured in the creation of form (at the latest) Is this true? Is it a bug? -- NNTP.hk - (^(oo)^) http://www.nntp.hk/web/ . Link to comment Share on other sites More sharing options...
Guest Posted January 4, 2011 Author Share Posted January 4, 2011 Message from: "Javi" -- NNTP.hk - (^(oo)^) http://www.nntp.hk/web/ "Javi" wrote: > > I have tried this: > > ///////////////////////////////////////////////// > type > TMainForm = class(TUniForm) > ..... > public > UniScreen:TUniScreenMask; > end; > > // NOT WORK > procedure TMainForm.UniFormCreate(Sender: TObject); > begin > UniScreen := TUniScreenMask.Create(UniApplication); > UniScreen.DisplayMessage := 'hola holita'; > UniSCreen.AttachedControl := UniButton1; > UniScreen.Enabled := True; > end; > > // NOT WORK > procedure TMainForm.Procedimiento(Sender: TObject); > begin > UniScreen := TUniScreenMask.Create(UniApplication); > UniScreen.DisplayMessage := 'hola holita'; > UniSCreen.AttachedControl := UniButton1; > UniScreen.Enabled := True; > end; > /////////////////////////////////////////////////// > > But this does not work. I have also tried this: > > ///////////////////////////////////////////////// > type > TMainForm = class(TUniForm) > UniScreenMask1:TUniScreenMask; > end; > > // WORK !!! > procedure TMainForm.UniFormCreate(Sender: TObject); > begin > UniScreenMask1.AttachedControl := UniButton1; > end; > > // NOT WORK > procedure TMainForm.Procedimiento(Sender: TObject); > begin > UniScreenMask1.AttachedControl := UniButton1; > end; > /////////////////////////////////////////////////// > > I think the TUniScreenMask component, it only works if it is created at design time. And it is > configured in the creation of form (at the latest) > Is this true? Is it a bug? > > -- > NNTP.hk - (^(oo)^) > http://www.nntp.hk/web/ > > . Link to comment Share on other sites More sharing options...
Guest Posted January 4, 2011 Author Share Posted January 4, 2011 Message from: "Farshad Mohajeri" Try this: procedure TMainForm.UniFormCreate(Sender: TObject); var M : TUniScreenMask; begin M:=TUniScreenMask.Create(Self); M.AttachedControl:=UniButton1; M.DisplayMessage:='My Message'; end; "Javi" wrote in message news:TvATQU%23qLHA.2316@anaxagvs227... >I have tried this: > > ///////////////////////////////////////////////// > type > TMainForm = class(TUniForm) > ..... > public > UniScreen:TUniScreenMask; > end; > > // NOT WORK > procedure TMainForm.UniFormCreate(Sender: TObject); > begin > UniScreen := TUniScreenMask.Create(UniApplication); > UniScreen.DisplayMessage := 'hola holita'; > UniSCreen.AttachedControl := UniButton1; > UniScreen.Enabled := True; > end; > > // NOT WORK > procedure TMainForm.Procedimiento(Sender: TObject); > begin > UniScreen := TUniScreenMask.Create(UniApplication); > UniScreen.DisplayMessage := 'hola holita'; > UniSCreen.AttachedControl := UniButton1; > UniScreen.Enabled := True; > end; > /////////////////////////////////////////////////// > > But this does not work. I have also tried this: > > ///////////////////////////////////////////////// > type > TMainForm = class(TUniForm) > UniScreenMask1:TUniScreenMask; > end; > > // WORK !!! > procedure TMainForm.UniFormCreate(Sender: TObject); > begin > UniScreenMask1.AttachedControl := UniButton1; > end; > > // NOT WORK > procedure TMainForm.Procedimiento(Sender: TObject); > begin > UniScreenMask1.AttachedControl := UniButton1; > end; > /////////////////////////////////////////////////// > > I think the TUniScreenMask component, it only works if it is created at > design time. And it is configured in the creation of form (at the latest) > Is this true? Is it a bug? > > -- > NNTP.hk - (^(oo)^) > http://www.nntp.hk/web/ > . Link to comment Share on other sites More sharing options...
Guest Posted January 5, 2011 Author Share Posted January 5, 2011 Message from: "Javi" Thanks. My problem was this: TUniScreenMask.Create(UniApplication); -- NNTP.hk - (^(oo)^) http://www.nntp.hk/web/ . 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