I've written code in a grid as follows

** init event

Local oColumn As Column, oControl
For Each oColumn In This.Columns
    For Each oControl In oColumn.Controls
        If Pemstatus(oControl,'MouseDown',5)
            Bindevent(oControl,'MouseDown',This,'MouseDown')
        EndIf
    endfor
EndFor

** mousedown event

LPARAMETERS nButton, nShift, nXCoord, nYCoord

Local nWhere, nRelRow, nRelCol,cBackColor,cForeColor,nCol

This.GridHitTest(nXCoord,nYCoord,@nWhere,@nRelRow,@nRelCol)

Do case
   Case nWhere = 3        && cell

    nCol = this.columncount - Abs(m.nRelCol)
nCol = Iif(nCol=0,1,nCol) && nCol would be 0 if there is only one column in the grid

cBackColor = 'this.column'+Alltrim(Str(nCol))+'.text1.backcolor = ' +Transform(Rgb(255,0,0)) && red cForeColor = 'this.column'+Alltrim(Str(nCol))+'.text1.forecolor = ' +Transform(Rgb(255,255,255)) && white

    &cBackColor
    &cForeColor

   Otherwise
endcase

The purpose of the above is to make the cell where I click red with white letters. If I do not use this code, everytime I click on any cell, it will be "transparent" and not turn red. In this manner, anywhere I click, that cell turns red.

However, the code written in the doubleclick event of the cell (textbox of the column) does not fire. Without the above code, the dblclick works as expected

Can't find the reason for this.
Any help will be appreciated

Rafael Copquin


_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/5231fff7.2070...@fibertel.com.ar
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to