wwLayoutGrid question

Comments

2 comments

  • Roy Woll

    You could change the drawrect location by using the OnCustomDrawControl event. For instance, the following code moves a control to the right under certain conditions.

    procedure TMainDemoForm.lgDemoCustomDrawControl(Sender: TObject;
      CellAttributes: TwwCustomDrawControlAttributes);
    var r: TRectF;
    begin
      if (CellAttributes.Control=lblNewFeatures) or
         (CellAttributes.Control=lblChildNewFeatures) then
      begin
        if not (CellAttributes.GetValue('NewFeatures').AsBoolean) then
        begin
          r:= CellAttributes.DrawRect;
          r.left:= r.right - 50;
          r.right:= r.left + CellAttributes.DrawRect.Width;
          CellAttributes.DrawRect:=r;
        end;
      end;
    end;
    0
    Comment actions Permalink
  • Daniel Croghan

    Thank you very much.  I will give your suggestion a try.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk