HMG4 GRID problem
Posted: Thu Sep 29, 2011 3:07 pm
Does anyone know why the cursor keys are not working in a grid? Neither in my program nor in the demos.
Exclusive forum for HMG, a Free / Open Source xBase WIN32/64 Bits / GUI Development System
http://hmgforum.com/
It's the same problem that was in virtualgrid.Ricci wrote:Does anyone know why the cursor keys are not working in a grid? Neither in my program nor in the demos.
Code: Select all
IF !::lAllowEdit .or. ::lMultiSelect
// Nothing doing
RETURN .T. <======== must be .F.
Code: Select all
ELSEIF Pcount() == 3
oItem := QTableWidgetItem()
IF ValType( ::aColumnJustify ) != 'U'
DO CASE
CASE ::aColumnJustify[nCol] == GRID_JTFY_LEFT
oItem:setTextAlignment( Qt_AlignLeft )
CASE ::aColumnJustify[nCol] == GRID_JTFY_RIGHT
oItem:setTextAlignment( Qt_AlignRight )
CASE ::aColumnJustify[nCol] == GRID_JTFY_CENTER
oItem:setTextAlignment( Qt_AlignHCenter )
ENDCASE
ENDIF
Code: Select all
ELSEIF Pcount() == 3
oItem := QTableWidgetItem()
IF ValType( ::aColumnJustify ) != 'U'
DO CASE
CASE ::aColumnJustify[nCol] == GRID_JTFY_LEFT
oItem:setTextAlignment( hb_bitOR( Qt_AlignVCenter, Qt_AlignLeft ) )
CASE ::aColumnJustify[nCol] == GRID_JTFY_RIGHT
oItem:setTextAlignment( hb_bitOR( Qt_AlignVCenter, Qt_AlignRight ) )
CASE ::aColumnJustify[nCol] == GRID_JTFY_CENTER
oItem:setTextAlignment( hb_bitOR( Qt_AlignVCenter, Qt_AlignHCenter ) )
ENDCASE
ENDIF