Jump to content


Photo

Don't draw unused rows


  • Please log in to reply
3 replies to this topic

#1 uli

uli
  • Members
  • 26 posts

Posted 03 November 2006 - 01:23 PM

Is it possible to completely supress the drawing of unused rows? If my grid has not enough rows to occupy its full height there are drawn "dummy rows" to fill the empty space.

I found that GridLinesStyle := lsActiveRows does partially what I want (Attached File  1.gif   6.79KB   31 downloads), but the indicator column still stretches over the full grid height, whereas I want this: Attached File  2.gif   6.66KB   29 downloads.

TIA,
Uli.

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 03 November 2006 - 01:44 PM

Hello,

You may use OnCellColoring event for this. You may try next code:

if ARow > NextGrid.RowCount - 1 then CellColor := clGray;

I hope that this help,

regards
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 uli

uli
  • Members
  • 26 posts

Posted 03 November 2006 - 02:01 PM

QUOTE (Boki (Berg) @ Nov 3 2006, 01:44 PM) <{POST_SNAPBACK}>
You may use OnCellColoring event for this.

Thanks, Boki. Unfortunately, OnCellColoring doesn't seem to be called for the indicator column.

#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 03 November 2006 - 02:52 PM

Hello Uli,

Yes, indicator column is drawn separated from cells. I will add some property for controling this.

regards
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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users