Jump to content


Photo

MouseToCell and NxGridPrint


  • Please log in to reply
5 replies to this topic

#1 Fik

Fik
  • Members
  • 6 posts

Posted 15 July 2010 - 08:50 AM

Hello, first of all this is my first post here and i would like to thx Berg for his grid. I really like yours slides editor and it is reason why i am using yours grid atm.

I would like to ask if NextGrid have some procedure like MouseToCell and if not is there some "best" way how to find out on witch row and cell i am with my mouse cursor?

Second question is related to NxGridPrint. I did not find out how i can use it with NextGrid. I checked forums topics and bergs web site but with no luck. Can some1 push me in right direction?

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 15 July 2010 - 10:23 PM

Hello Fik,

You may use GetCellAtPos() function for this.

CODE
CellPoint: TPoint;

CellPoint := NextGrid1.GetCellAtPos(Point(X, Y));


2) All you have need is to set Associate property to the NextGrid you want to Print. And then call:

CODE
NxGridPrint1.Print;


Please note that NxGridPrint is usable for rudimentary printing only.

I hope that this helps.

Best 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 Fik

Fik
  • Members
  • 6 posts

Posted 19 July 2010 - 12:55 PM

Thx Boki, i will do that with GetCellAtPos() then.

About NxGridPrint. i thought something must be wrong, coz i did what you suggested at first, but nothing happen. Then i didn't moved on. I will explain what is happening. When i execute NxGridPrint1.Print; my computer start to do something, CPU usage rise, after few sec. it falls again, but nothing else happen. Do you know where can be problem? Can it be related somehow to fact that i am using Delphi 7 and my system is Windows Vista?

#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 19 July 2010 - 05:59 PM

Hello Fik,

Please try Demo 1 in Demos\Next Grid sub-folder. It use NxGridPrint component too.

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

#5 Fik

Fik
  • Members
  • 6 posts

Posted 26 July 2010 - 09:04 AM

I tryed Demo1 and it worked fine. When i clicked Print in menu, print dialog showed up, witch do not happen in my project. Tho, i only used Project1 as application, i cant compile it, i am mising some components.

#6 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 27 July 2010 - 01:23 AM

Hello Fik,

Print dialog is not included in component. It is called with using PrintDialog component from Delphi.

I suggest that you open this demo and copy/paste NxGridPrint component and code which is bellow print menu item.

I hope that this helps.

Best 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