CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Sizing

by etwoss » 25 Aug 2014 12:01

Hi

I Have a labelEx where if fill TextEx.Text
As you can see the text is ok, sizing goes ok, but i want to keep my Button after the text.
The height value is not jet known at server time


Eric
You do not have the required permissions to view the files attached to this post.
etwoss
 
Posts: 1205
Joined: 06 Feb 2014 08:58

by etwoss » 26 Aug 2014 08:17

Hi

Tried to achieve it using two region in one, where the first region contains the LabelEx and the Second one the button.
Still i have to 'calculated' the complete height of the Frame to give the LabelEx the space to expand. If the height is not enough , it 'overwrites' the second one with the button.

Eric
etwoss
 
Posts: 1205
Joined: 06 Feb 2014 08:58

by etwoss » 26 Aug 2014 08:55

Hi

Found some solution now, also with two regions in one, but having the first region "ClipRegion" is True
So now i can scroll the text of the label in that region and the button always is at the bottom of the text

One problem still, can't get a Vertical scrollbar for the region of the LabelEx

Eric
etwoss
 
Posts: 1205
Joined: 06 Feb 2014 08:58

by Alexander Bulei » 26 Aug 2014 09:39

Hi Eric,

One problem still, can't get a Vertical scrollbar for the region of the LabelEx


property CGScrollStyle?

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by etwoss » 26 Aug 2014 09:54

Hi

Solved it this way:

CGScrollStyle of the LabelEx is set to cgsbsVerticalAuto

Code: Select all
var
 S : TStringList;
begin
  S := TStringList.Create;
  try
    s.CommaText := Value;
    Height := 25 + Round(S.Count * 14.6); // calculate a little bit what the size could be

    if (Height > 400) then // max size of 400
      Height := 400;

    IWCGJQLabelQuestionDescription.Height := Height - IWCGJQRegionBottom.Height - 10; // recalculate the height of the Label
    IWCGJQLabelQuestionDescription.AutoSize := True; // Now set AutoSize to true
  finally
    FreeAndNil(s);
  end;

  IWCGJQLabelQuestionDescription.TextEx.Text :=
    StringReplace(Value, ''#$D#$A'', '<BR>', [rfReplaceAll]);

You do not have the required permissions to view the files attached to this post.
etwoss
 
Posts: 1205
Joined: 06 Feb 2014 08:58

by Alexander Bulei » 26 Aug 2014 09:56

Hi Eric,

Thanks for sharing the solution ;)

BR
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal


Return to JQLabelEx

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.