Jump to content


Photo

Custom Drawing in Cells.


  • Please log in to reply
12 replies to this topic

#1 Speed

Speed
  • Members
  • 92 posts

Posted 01 July 2020 - 08:36 AM

Hi Boki,

 

If I wanted to draw say a small rectangle and an image using the OnCustomDrawCell event, how could I accomplish this? 

 

Please see attached image for an example of what I mean.  In the example I have an orange vertical rectangle, and a green arrow image.

 

Thanks,

 

Steve

 

 

Attached Files



#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,901 posts
  • Gender:Male

Posted 01 July 2020 - 10:04 PM

Hi,

 

I beleive you need to do custom drawing, but on each of the cells.


boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.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 Speed

Speed
  • Members
  • 92 posts

Posted 02 July 2020 - 01:11 AM

Hi,

 

I beleive you need to do custom drawing, but on each of the cells.

Hi Boki,

 

Yes, I realise that.  I was hoping you could give an example of how this could be done.

 

= Steve



#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,901 posts
  • Gender:Male

Posted 04 July 2020 - 02:33 PM

Hi,

 

I suggest checking out this demo project:

C:\...\NextSuite 6\Demos\Next Grid\Delphi XE6\Cell Background custom drawing

 

It contains what you need. I will try to write soon an article about custom drawing for more details.


boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.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.

#5 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,901 posts
  • Gender:Male

Posted 04 July 2020 - 02:34 PM

You will like to check DrawingOptions property of the Column and OnDrawBackground event. 


boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.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.

#6 Speed

Speed
  • Members
  • 92 posts

Posted 06 July 2020 - 01:38 AM

Hi,

 

I suggest checking out this demo project:

C:\...\NextSuite 6\Demos\Next Grid\Delphi XE6\Cell Background custom drawing

 

It contains what you need.

Got it.  I was using the wrong event before but now I know to use each column's OnDrawBackground event.

 

 

I will try to write soon an article about custom drawing for more details.

 

That would be very useful.

 

Thanks.

 

= Steve



#7 Speed

Speed
  • Members
  • 92 posts

Posted 06 July 2020 - 01:40 AM

You will like to check DrawingOptions property of the Column and OnDrawBackground event. 

So DrawingOptions := [doContent,doCustom].

 

Thanks.

 

= Steve



#8 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,901 posts
  • Gender:Male

Posted 06 July 2020 - 02:11 AM

Yes, correct 


boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.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.

#9 Speed

Speed
  • Members
  • 92 posts

Posted 07 July 2020 - 07:09 AM

Hi Boki,

 

It's starting to come together now.

 

= Steve

 

 

Attached Files



#10 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,901 posts
  • Gender:Male

Posted 07 July 2020 - 12:58 PM

Look quite cool!


boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.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.

#11 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,901 posts
  • Gender:Male

Posted 07 July 2020 - 01:17 PM

I like to ask is it possible to put screenshot (and link if you want) to your application inside section "Applications made with NextGrid" that I plan to make online again.


boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.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.

#12 Speed

Speed
  • Members
  • 92 posts

Posted 08 July 2020 - 01:13 AM

Look quite cool!

Thanks Boki.



#13 Speed

Speed
  • Members
  • 92 posts

Posted 08 July 2020 - 01:14 AM

I like to ask is it possible to put screenshot (and link if you want) to your application inside section "Applications made with NextGrid" that I plan to make online again.

Yeah sure, not a problem.

 

= Steve






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users