Jump to content


Photo

Rounded Corners


  • Please log in to reply
2 replies to this topic

#1 santiago14

santiago14
  • Members
  • 25 posts

Posted 13 June 2016 - 11:59 PM

I want the edges of the grid are rounded. It's possible?

Thank.



#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,196 posts
  • Gender:Male

Posted 14 June 2016 - 01:09 PM

Unfortunately, not directly. But, maybe you can place round rect shape component behind grid? Then you can set Margins for Grid only.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 DelphiToday

DelphiToday
  • Members
  • 149 posts
  • Gender:Male

Posted 15 June 2016 - 11:20 AM

Tip?

 

You can create Rounded corners with this procedure.

Call: RoundCornerOf(NextGrid);

procedure RoundCornerOf(Control: TWinControl);
  var
     R: TRect;
     Rgn: HRGN;
  begin
     with Control do
     begin
       R := ClientRect;
       rgn := CreateRoundRectRgn(R.Left, R.Top, R.Right, R.Bottom, 20, 20) ;
       Perform(EM_GETRECT, 0, lParam(@r)) ;
       InflateRect(r, - 4, - 4) ;
       Perform(EM_SETRECTNP, 0, lParam(@r)) ;
       SetWindowRgn(Handle, rgn, True) ;
       Invalidate;
     end;
  end;





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users