Jump to content

Recommended Posts

Posted

Hi all

 

I did a little mock-up of these forums using the unigui StringGrid to have a little play with the onDrawCell event..

 

The results were very pleasing :)

Just thought I'd share :)

post-11-0-57845200-1305893554_thumb.png

  • Administrators
Posted

Hi all

 

I did a little mock-up of these forums using the unigui StringGrid to have a little play with the onDrawCell event..

 

The results were very pleasing :)

Just thought I'd share :)

 

Hmm.. looks like a screen shot of our forums! :)

Posted

Hmm.. looks like a screen shot of our forums! :)

 

 

Its cool yeah.. I couldn't match the fonts and colors exactly, and some of the images are missing, but it just goes to show what you can do with UniGUI in 5 mins.

 

procedure TMainForm.Grid1DrawCell(Sender: TObject; ACol, ARow: Integer;
 var Value: string; Attribs: TUniCellAttribs);
begin
 If ACol = 0 then Attribs.Color := $00f6f6f6;
 If ACol = 2 then Attribs.Color := $00f6f6f6;
end;

procedure TMainForm.UniFormCreate(Sender: TObject);
begin
 Grid1.ColWidths[0] := 60;
 Grid1.ColWidths[1] := 400;
 Grid1.ColWidths[2] := 100;
 Grid1.ColWidths[3] := 200;
 Grid1.Cells[1,0] := '<b>General</b><br>' +
                     'General discussions';
 Grid1.Cells[1,1] := '<b>Bug reports</b><br>' +
                     'Forum dedicated to bug reports';


 Grid1.Cells[2,0] := '317 Topics<br>' +
                     '1880 Replies';
 Grid1.Cells[2,1] := '313 Topics<br>' +
                     '937 Replies';

 Grid1.Cells[3,0] := 'Today, 08:30 AM<br>' +
                     '<b>In:</b>Gradients and panels<br>' +
                     '<b>By:</b>Jason Reid';
 Grid1.Cells[3,1] := 'Today, 07:33 AM<br>' +
                     '<b>In:</b>URLParameters<br>' +
                     '<b>By:</b>richard wu';

 Grid1.Cells[0,0]  := '<img src="f_unread.png">';
 Grid1.Cells[0,1]  := '<img src="f_unread.png">';


end;

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...