Página 1 de 1

Active cell coordinates in TBrowse

Publicado: Lun May 14, 2007 11:59 am
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.

Active cell coordinates in TBrowse

Publicado: Lun May 14, 2007 4:45 pm
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.
>

Active cell coordinates in TBrowse

Publicado: Lun May 14, 2007 4:45 pm
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.
>

Active cell coordinates in TBrowse

Publicado: Mar May 15, 2007 5:25 pm
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.
>

Active cell coordinates in TBrowse

Publicado: Mar May 15, 2007 5:25 pm
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.
>

Active cell coordinates in TBrowse

Publicado: Mar May 15, 2007 9:27 pm
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.

Active cell coordinates in TBrowse

Publicado: Mar May 15, 2007 9:27 pm
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.

Active cell coordinates in TBrowse

Publicado: Mar May 15, 2007 9:51 pm
por Oleg
Ignacio!
Thank you very much. Your code is working fine with small correction
nRow := ( (nSel-1) * :nIntRowHeight ) + :HeaderHeight()
Regards, Oleg.

Active cell coordinates in TBrowse

Publicado: Mar May 15, 2007 9:51 pm
por Oleg
Ignacio!
Thank you very much. Your code is working fine with small correction
nRow := ( (nSel-1) * :nIntRowHeight ) + :HeaderHeight()
Regards, Oleg.