erich.wanker Posted March 12, 2021 Share Posted March 12, 2021 Hi, how can i set the heigh of a uniContainerPanel dependet on Textlengh of a uniMemo? in UniContainerpanel2 - i have a UniImage and a TuniMemo (for Text A) if the memotext is short - everything is OK if the memotext is longer - the memo shows a scrollbar .. thats what i have since now.. is it possible to increase the heigh of the uniMemo AND of uniContainerPanel2 automaticaly ?? ThanX for help Erich Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 12, 2021 Share Posted March 12, 2021 2 hours ago, erich.wanker said: how can i set the heigh of a uniContainerPanel dependet on Textlengh of a uniMemo? in UniContainerpanel2 - i have a UniImage and a TuniMemo (for Text A) if the memotext is short - everything is OK if the memotext is longer - the memo shows a scrollbar .. thats what i have since now.. is it possible to increase the heigh of the uniMemo AND of uniContainerPanel2 automaticaly ?? Hello, What alignment are you using? Server side or client side? Quote Link to comment Share on other sites More sharing options...
mhmda Posted March 13, 2021 Share Posted March 13, 2021 hi 3 Quote Link to comment Share on other sites More sharing options...
erich.wanker Posted March 15, 2021 Author Share Posted March 15, 2021 Hello mhmda 🙂 Thank you .. works perfect !! Quote Link to comment Share on other sites More sharing options...
erich.wanker Posted March 15, 2021 Author Share Posted March 15, 2021 Please 1 question - if it´s possible: How can i start the "resize-thing" after add some lines via code? - if i use the keyboard for input - everything works perfect 🙂 if i start following code - the unimemo and the UniContainerPanel1 are not resizing: unimemo1.Lines.Add('****'); unimemo1.Lines.Add('****'); unimemo1.Lines.Add('****'); unimemo1.Lines.Add('****'); unimemo1.Lines.Add('****'); unimemo1.Lines.Add('****'); unimemo1.Lines.Add('****'); unimemo1.Lines.Add('****'); unimemo1.Lines.Add('****'); unimemo1.Lines.Add('****'); unimemo1.Lines.Add('****'); unimemo1.Lines.Add('****'); unimemo1.Lines.Add('****'); unimemo1.Lines.Add('****'); unimemo1.Lines.Add('****'); unimemo1.Lines.Add('****'); unimemo1.Lines.Add('****'); unimemo1.Lines.Add('****'); unimemo1.Lines.Add('****'); unimemo1.Lines.Add('****'); unimemo1.Lines.Add('****'); unimemo1.Lines.Add('****'); unimemo1.Lines.Add('****'); ThanX for suggestions Erich Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 15, 2021 Share Posted March 15, 2021 1 hour ago, erich.wanker said: Please 1 question - if it´s possible: How can i start the "resize-thing" after add some lines via code? - if i use the keyboard for input - everything works perfect 🙂 if i start following code - the unimemo and the UniContainerPanel1 are not resizing: Hello, procedure TMainForm.UniFormCreate(Sender: TObject); begin UniMemo1.JSInterface.JSAddListener('dirtychange', 'function(){this.autoSize()}'); end; Quote Link to comment Share on other sites More sharing options...
erich.wanker Posted March 15, 2021 Author Share Posted March 15, 2021 Hello Sherzod, thanx for your work 🙂 This solution works for just 1 time .. if i add lines (uniButton_add.onClick -> unimemo1.Lines.Add('****'); ) - the memo grows ... if i clear the lines (uniButton_clear.onClick -> unimemo1.Lines.Clear; ) and click uniButton_add AGAIN - the uniMemo didnt grow again Thanx Erich Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 15, 2021 Share Posted March 15, 2021 1 hour ago, erich.wanker said: if i add lines (uniButton_add.onClick -> unimemo1.Lines.Add('****'); ) - the memo grows ... if i clear the lines (uniButton_clear.onClick -> unimemo1.Lines.Clear; ) and click uniButton_add AGAIN - the uniMemo didnt grow again Okay, let's try this approach: procedure TMainForm.UniButton2Click(Sender: TObject); begin with UniMemo1 do begin //Clear; JSInterface.JSCall('setValue', []); end; end; 1 Quote Link to comment Share on other sites More sharing options...
erich.wanker Posted March 15, 2021 Author Share Posted March 15, 2021 it works PERFECT 🙂 ThanX 1 Quote Link to comment Share on other sites More sharing options...
PS1 Posted January 17 Share Posted January 17 HI, solution here was probably deleted. Can someone tell me what was the solution for auto resizing memo height? This is not enough : procedure TMainForm.UniFormCreate(Sender: TObject); begin UniMemo1.JSInterface.JSAddListener('dirtychange', 'function(){this.autoSize()}'); end; Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 17 Share Posted January 17 Hello, Which alignment, layout are you using? Quote Link to comment Share on other sites More sharing options...
PS1 Posted January 18 Share Posted January 18 Hello Client alignment, layout = vbox on mobile version Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 18 Share Posted January 18 21 minutes ago, PS1 said: Client alignment, layout = vbox on mobile version Do you have a simple app to check? Quote Link to comment Share on other sites More sharing options...
PS1 Posted January 18 Share Posted January 18 Yes, hereTestCase.zip Quote Link to comment Share on other sites More sharing options...
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.