wwLayoutGrid question
Hello, I am looking for some suggestions on how I could use a wwLayoutGrid (or other FirePower controls) to accomplish the task of displaying a "Conversation" similar to the way an iPhone displays text communications. This would show the user's conversation entries on the right side and the other person's entries on the left side. I would also need the ability to show the date/time of the conversation above (or below) each entry.
Any suggestions would be greatly appreciated.
Thank you
-
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;
Please sign in to leave a comment.
Comments
2 comments