In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

Active cell coordinates in TBrowse

Xailer professional forum in English
Responder
Oleg
Mensajes: 474
Registrado: Mié Jun 07, 2006 3:45 pm

Active cell coordinates in TBrowse

Mensaje por Oleg »

Dear developers!
Is there any way to determine TBrowse's active cell coordinates (in pixels)?
I cannot calculate it by myself because I have nRowHeight = 0
Thank you. Oleg.
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9469
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Active cell coordinates in TBrowse

Mensaje por ignacio »

Oleg,
Take a loook at TBrwColumn:OnDrawCell event
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Oleg" <info@cluster.samara.ru> escribió en el mensaje
news:[email=4648330b@ozsrv2.ozlan.local...]4648330b@ozsrv2.ozlan.local...[/email]
> Dear developers!
>
> Is there any way to determine TBrowse's active cell coordinates (in
> pixels)?
> I cannot calculate it by myself because I have nRowHeight = 0
>
> Thank you. Oleg.
>
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
NoName
Mensajes: 531
Registrado: Vie Feb 03, 2006 7:27 pm

Active cell coordinates in TBrowse

Mensaje por NoName »

Oleg,
Take a loook at TBrwColumn:OnDrawCell event
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Oleg" <info@cluster.samara.ru> escribió en el mensaje
news:[email=4648330b@ozsrv2.ozlan.local...]4648330b@ozsrv2.ozlan.local...[/email]
> Dear developers!
>
> Is there any way to determine TBrowse's active cell coordinates (in
> pixels)?
> I cannot calculate it by myself because I have nRowHeight = 0
>
> Thank you. Oleg.
>
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9469
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Active cell coordinates in TBrowse

Mensaje por ignacio »

Oleg,
Include this method on your own overloaded TBrwColumn class.
Regards,
METHOD GetGridEditBounds() CLASS TBrwColumn
LOCAL nRow, nCol, nWidth, nHeight, nSel
WITH OBJECT ::oParent
nSel := :nRowSel
nRow := ( nSel * :nIntRowHeight ) + :HeaderHeight()
nCol := ::nDisplayCol
nWidth := ::nWidth - 2
nHeight := :nIntRowHeight - 2
IF :nColDividerStyle < blINSET .AND. ::nPos > 1
nCol--
nWidth++
ENDIF
IF :nColDividerStyle == blNOLINES
nWidth++
ENDIF
IF :nRowDividerStyle < blINSET
nHeight++
ENDIF
IF :nRowDividerStyle == blNOLINES
nHeight++
ENDIF
END WITH
RETURN {nCol, nRow, nWidth, nHeight }
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Oleg" <info@cluster.samara.ru> escribió en el mensaje
news:[email=4648aa95@ozsrv2.ozlan.local...]4648aa95@ozsrv2.ozlan.local...[/email]
> Ignacio!
>
> Thank you for answer.
>
> I need this because I try to make my own editing for TBrowse.
> OnDraw event is too "expensive", it calls too many times (for every
> drawing cell).
> It would be great if you provide TBrowse class with method
> GetCellRect(nRowPos, nColumnPos) -> aRect
>
> Is it possible?
>
> Thank you. Oleg.
>
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
NoName
Mensajes: 531
Registrado: Vie Feb 03, 2006 7:27 pm

Active cell coordinates in TBrowse

Mensaje por NoName »

Oleg,
Include this method on your own overloaded TBrwColumn class.
Regards,
METHOD GetGridEditBounds() CLASS TBrwColumn
LOCAL nRow, nCol, nWidth, nHeight, nSel
WITH OBJECT ::oParent
nSel := :nRowSel
nRow := ( nSel * :nIntRowHeight ) + :HeaderHeight()
nCol := ::nDisplayCol
nWidth := ::nWidth - 2
nHeight := :nIntRowHeight - 2
IF :nColDividerStyle < blINSET .AND. ::nPos > 1
nCol--
nWidth++
ENDIF
IF :nColDividerStyle == blNOLINES
nWidth++
ENDIF
IF :nRowDividerStyle < blINSET
nHeight++
ENDIF
IF :nRowDividerStyle == blNOLINES
nHeight++
ENDIF
END WITH
RETURN {nCol, nRow, nWidth, nHeight }
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Oleg" <info@cluster.samara.ru> escribió en el mensaje
news:[email=4648aa95@ozsrv2.ozlan.local...]4648aa95@ozsrv2.ozlan.local...[/email]
> Ignacio!
>
> Thank you for answer.
>
> I need this because I try to make my own editing for TBrowse.
> OnDraw event is too "expensive", it calls too many times (for every
> drawing cell).
> It would be great if you provide TBrowse class with method
> GetCellRect(nRowPos, nColumnPos) -> aRect
>
> Is it possible?
>
> Thank you. Oleg.
>
Oleg
Mensajes: 474
Registrado: Mié Jun 07, 2006 3:45 pm

Active cell coordinates in TBrowse

Mensaje por Oleg »

Ignacio!
Thank you for answer.
I need this because I try to make my own editing for TBrowse.
OnDraw event is too "expensive", it calls too many times (for every drawing
cell).
It would be great if you provide TBrowse class with method
GetCellRect(nRowPos, nColumnPos) -> aRect
Is it possible?
Thank you. Oleg.
Oleg
Mensajes: 474
Registrado: Mié Jun 07, 2006 3:45 pm

Active cell coordinates in TBrowse

Mensaje por Oleg »

Ignacio!
Thank you for answer.
I need this because I try to make my own editing for TBrowse.
OnDraw event is too "expensive", it calls too many times (for every drawing
cell).
It would be great if you provide TBrowse class with method
GetCellRect(nRowPos, nColumnPos) -> aRect
Is it possible?
Thank you. Oleg.
Oleg
Mensajes: 474
Registrado: Mié Jun 07, 2006 3:45 pm

Active cell coordinates in TBrowse

Mensaje por Oleg »

Ignacio!
Thank you very much. Your code is working fine with small correction
nRow := ( (nSel-1) * :nIntRowHeight ) + :HeaderHeight()
Regards, Oleg.
Oleg
Mensajes: 474
Registrado: Mié Jun 07, 2006 3:45 pm

Active cell coordinates in TBrowse

Mensaje por Oleg »

Ignacio!
Thank you very much. Your code is working fine with small correction
nRow := ( (nSel-1) * :nIntRowHeight ) + :HeaderHeight()
Regards, Oleg.
Responder