<?xml version="1.0" encoding="UTF-8"?>
<part class="form">
  <style>
    <property name="Geometry">{0,130,581,221}</property>
    <property name="Name">[]</property>
    <property name="Caption">[Form1]</property>
    <property name="AlwaysOnTop">.F.</property>
    <property name="AutoCenter">.T.</property>
    <property name="Icon">[]</property>
    <property name="FormType">[dlgModal]</property>
    <property name="Modal">.T.</property>
    <property name="FromStyle">[Popup]</property>
    <property name="ScopeVarObj">[Local]</property>
    <property name="lClipper">.F.</property>
    <property name="lExitOnEnter">.T.</property>
    <property name="lExitOnESC">.T.</property>
    <property name="Variables">{vLinesTxt,ifirst,ilast}</property>
    <property name="Clipsiblings">.F.</property>
    <property name="Clipchildren">.F.</property>
    <property name="TitleBar">.T.</property>
    <property name="StyleBorder">[3 - Sizable (Default)]</property>
    <property name="NoIcon">.F.</property>
    <property name="SystemMenu">.T.</property>
    <property name="Minimizebox">.F.</property>
    <property name="Maximizebox">.F.</property>
    <property name="Closable">.T.</property>
    <property name="AbsAlignment">.T.</property>
    <property name="WindowState">[1 - Normal (Default)]</property>
    <property name="minHeight">-1</property>
    <property name="maxHeight">-1</property>
    <property name="minWidth">-1</property>
    <property name="maxWidth">-1</property>
    <property name="ScrollBars">[0 - None (Default)]</property>
    <property name="DSControl">.F.</property>
  </style>
  <part class="gridex" inclass="">
    <style>
      <property name="Geometry">{5,5,570,163}</property>
      <property name="Name">[oGrid]</property>
      <property name="font">
        <font name="Lucida Bright" width="0" height="-19" weight="400"/>
      </property>
      <property name="Items">{Coluna1/dados 1,coluna2/dados2}</property>
      <property name="GridLines">.F.</property>
      <property name="TabIndex">1</property>
    </style>
    <method name="onClick"  ="">
      <![CDATA[iFirst := ListView_GetTopIndex( oGrid:handle )
MsgINFO('ifirst '+STR(ifirst) )
iLast := iFirst + ListView_GetCountPerPage( oGrid:handle )
MsgINFO('iLast '+STR(iLast) )
ListView_RedrawItems( oGrid:handle , iFirst, iLast )
MsgINFO('redesenhou' )
]]>
    </method>
    <method name="onInit"  ="">
      <![CDATA[vLinesTxt := {'linha1', 'linha2 do texto', 'linha3'}
oGrid:aItems := vLinesTxt
MsgINFO('len vlinestxt: '+STR(LEN(vlinestxt)))
oGrid:AddColumn( "", 300)
oGrid:bDispInfo := {|oGrid, nRow, nCol| cLine:=if( valtype(vLinesTxt[nRow])='C', vLinesTxt[nRow], vLinesTxt[nRow,nCol]), WriteLog('cLine '+cLine), cLine }
MsgINFO('vai notificar')
oGrid:Notify(-150)
// MsgINFO('vai HWG_InitCommonControlsEx() ')
// HWG_InitCommonControlsEx()
MsgINFO('colunas '+STR(LEN(ogrid:aColumns)) )]]>
    </method>
    <method name="onKeyDown"  ="">
      <![CDATA[MsgINFO('onkeydown')
iFirst := ListView_GetTopIndex( oGrid:handle )
MsgINFO('ifirst '+STR(ifirst) )
iLast := iFirst + ListView_GetCountPerPage( oGrid:handle )
MsgINFO('iLast '+STR(iLast) )
ListView_RedrawItems( oGrid:handle , iFirst, iLast )
MsgINFO('redesenhou' )

]]>
    </method>
    <method name="onDispInfo"  ="">
      <![CDATA[PARAMETERS oGrid, nRow, nCol
MsgINFO('esta na ondispinfo')
cLine:=if( valtype(vLinesTxt[nRow])='C', vLinesTxt[nRow], vLinesTxt[nRow,nCol])
// WriteLog('nrow:'+STR(nrow)+' ncol: '+STR(ncol)+' cLine '+cLine)
RETURN cLine]]>
    </method>
  </part>
  <part class="buttonex" inclass="">
    <style>
      <property name="Geometry">{241,179,98,32}</property>
      <property name="Name">[oButton]</property>
      <property name="Caption">[Ok]</property>
      <property name="TabIndex">2</property>
    </style>
    <method name="onClick"  ="">
      <![CDATA[oGrid:REFRESH()
MsgINFO('vaai eval')
IF oGrid:bDispInfo <> NIL
   MsgINFO( 'bdispinfo 1 '+EVAL(oGrid:bDispInfo, oGrid, 1) )
ELSE
   MsgINFO( 'bdispinfo estah nil ')
endif
MsgINFO('refrescou')
ENDDIALOG()]]>
    </method>
  </part>
</part>
