topic
stringlengths
1
63
text
stringlengths
1
577k
eagle fw + mysql
[quote="cnavarro":36yl5fqg]Manu, te envié hace tiempo varios correos para actualizarme, pero no obtuve respuesta Estuve bastante tiempo apartado de este tema y ya no me acordaba ni del mail que tenía en yahoo ni id, ni na de na <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Me quedé en [quote:36yl5fqg] Fecha.....: 12/03/2005 Version...: 3.02 [/quote:36yl5fqg] Aunque pone 3.03 Bueno, aún tengo esto que me fue de gran ayuda en su momento y que de he retomar de nuevo para ponerme al dia <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P --> [url=http&#58;//postimage&#46;org/:36yl5fqg][img:36yl5fqg]http&#58;//s26&#46;postimg&#46;org/d2lzkilg9/Libro_Eagle&#46;png[/img:36yl5fqg][/url:36yl5fqg] [url=http&#58;//postimage&#46;org/:36yl5fqg][img:36yl5fqg]http&#58;//s26&#46;postimg&#46;org/wlqktvk7t/Libro_Eagle1_001&#46;png[/img:36yl5fqg][/url:36yl5fqg][/quote:36yl5fqg] SAludos Al forum Alguien tiene esta guia alguien me la podria facilitar
eagle fw + mysql
Rubén, yo lo tengo, evidentemente, pero no lo tengo en formato digital Tampoco sé si podría/debería digitalizarlo y publicarlo sin el explícito permiso de su autor Son de estas muchas cosas que he guardado para cuando creen de una vez el Premio Nobel a los desarrollos en "XBase", creo que hay mucha gente que se lo han ganado <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Saludos
eagle fw + mysql
TMysql no aparece en esas contiribs? Donde mas se puede conseguir?
eagle fw + mysql
[quote="cnavarro":1hv3qbgh]Rubén, yo lo tengo, evidentemente, pero no lo tengo en formato digital Tampoco sé si podría/debería digitalizarlo y publicarlo sin el explícito permiso de su autor Son de estas muchas cosas que he guardado para cuando creen de una vez el Premio Nobel a los desarrollos en "XBase", creo que hay mucha gente que se lo han ganado <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Saludos[/quote:1hv3qbgh] Gracias. Tu has llegado a crear la libreria de Eagle
eagle fw + mysql
[quote="Compuin":3i545ugw]TMysql no aparece en esas contiribs? Donde mas se puede conseguir?[/quote:3i545ugw] Si está [quote:3i545ugw] ..\contrib\hbmysql [/quote:3i545ugw]
eagle fw + mysql
[quote="ruben Dario":1orwmvmr] Gracias. Tu has llegado a crear la libreria de Eagle[/quote:1orwmvmr] Rubén, como puedes comprobar, por el texto de mi post, y la fecha del libro, yo lo usé cuando empezaba Eagle, allá por el 2004-2005, y funcionaba muy bien, pero luego he estado algunos años sin tocar este tema. Desde entonces no he vuelto a utilizar Eagle y no dispongo de la versión actual para poder ayudarte a crear la lib. Si tengo un rato, puedo buscar en el "baúl de los recuerdos" la versión que utilizaba e intentar crear la lib con las herramientas actuales, aunque no sé lo que me encontraré. Por el foro, suele conectarse su autor
eagle fw + mysql
[quote="cnavarro":2vr74zih][quote="ruben Dario":2vr74zih] Gracias. Tu has llegado a crear la libreria de Eagle[/quote:2vr74zih] Rubén, como puedes comprobar, por el texto de mi post, y la fecha del libro, yo lo usé cuando empezaba Eagle, allá por el 2004-2005, y funcionaba muy bien, pero luego he estado algunos años sin tocar este tema. Desde entonces no he vuelto a utilizar Eagle y no dispongo de la versión actual para poder ayudarte a crear la lib. Si tengo un rato, puedo buscar en el "baúl de los recuerdos" la versión que utilizaba e intentar crear la lib con las herramientas actuales, aunque no sé lo que me encontraré. Por el foro, suele conectarse su autor[/quote:2vr74zih] Gracias, Te lo agradesco. Tengo una version Vieja La 3.0, requiero crear los LIB para bcc582 y bcc7 para Harbour y xHarbour.
eagle fw + mysql
Si lo vas intentando, quizás pueda echarte una mano, a ver si lo conseguimos Vete poniendo los errores que te da Recuerdo que habia un fichero .bat para Harbour, otro para xHarbour y para C3 que llamaba a un .mak ( Eagle.mak )
eagle fw + mysql
[quote="cnavarro":1xal2f7q]Si lo vas intentando, quizás pueda echarte una mano, a ver si lo conseguimos Vete poniendo los errores que te da Recuerdo que habia un fichero .bat para Harbour, otro para xHarbour y para C3 que llamaba a un .mak ( Eagle.mak )[/quote:1xal2f7q] Error Usando BCC7 [code=fw:1xal2f7q]<div class="fw" id="{CB}" style="font-family: monospace;"><br />MAKE Version <span style="color: #000000;">5.41</span> &nbsp;Copyright <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> <span style="color: #000000;">1987</span>, <span style="color: #000000;">2014</span> Embarcadero Technologies, Inc.<br />&nbsp; &nbsp; k:\bcc582\BIN\bcc32 -X -w -g50 -j1 -tWM -d -a8 -OS -O2 <span style="color: #000000;">-5</span> -c -DHB_OS_WIN_32_USED -DHB_GUI -DHB_API_MACROS -DHB_STACK_MACROS -DHB_FM_STATISTICS_OFF -Iinclude;.\msinc;k:\Harbour\include;k:\bcc582\include /nobj source\MSCTypes.c<br />Embarcadero C++ <span style="color: #000000;">7.00</span> <span style="color: #00C800;">for</span> Win32 Copyright <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> <span style="color: #000000;">1993</span><span style="color: #000000;">-2015</span> Embarcadero Technologies, Inc.<br />source\MSCTypes.c:<br /><span style="color: #000000;">Warning</span> W8004 k:\bcc582\include\windows\sdk\Ws2tcpip.h <span style="color: #000000;">626</span>: <span style="color: #ff0000;">'dwMsgLen'</span> is assigned a value that is never used in <span style="color: #00C800;">function</span> gai_strerrorA<br />Warning W8004 k:\bcc582\include\windows\sdk\Ws2tcpip.h <span style="color: #000000;">648</span>: <span style="color: #ff0000;">'dwMsgLen'</span> is assigned a value that is never used in <span style="color: #00C800;">function</span> gai_strerrorW<br />Warning W8027 k:\bcc582\include\windows\sdk\wspiapi.h <span style="color: #000000;">159</span>: <span style="color: #000000;">Functions</span> containing <span style="color: #00C800;">for</span> are not expanded <span style="color: #00C800;">inline</span><br />Warning W8027 k:\bcc582\include\windows\sdk\wspiapi.h <span style="color: #000000;">277</span>: <span style="color: #000000;">Functions</span> containing <span style="color: #00C800;">for</span> are not expanded <span style="color: #00C800;">inline</span><br />Warning W8012 k:\bcc582\include\windows\sdk\wspiapi.h <span style="color: #000000;">275</span>: <span style="color: #000000;">Comparing</span> signed and unsigned values in <span style="color: #00C800;">function</span> WspiapiQueryDNS<br />Warning W8027 k:\bcc582\include\windows\sdk\wspiapi.h <span style="color: #000000;">355</span>: <span style="color: #000000;">Functions</span> containing <span style="color: #00C800;">for</span> are not expanded <span style="color: #00C800;">inline</span><br />Warning W8027 k:\bcc582\include\windows\sdk\wspiapi.h <span style="color: #000000;">421</span>: <span style="color: #000000;">Functions</span> containing <span style="color: #00C800;">for</span> are not expanded <span style="color: #00C800;">inline</span><br />Warning W8027 k:\bcc582\include\windows\sdk\wspiapi.h <span style="color: #000000;">464</span>: <span style="color: #000000;">Functions</span> containing <span style="color: #00C800;">for</span> are not expanded <span style="color: #00C800;">inline</span><br />Warning W8027 k:\bcc582\include\windows\sdk\wspiapi.h <span style="color: #000000;">570</span>: <span style="color: #000000;">Functions</span> containing some <span style="color: #00C800;">if</span> statements are not expanded <span style="color: #00C800;">inline</span> in <span style="color: #00C800;">function</span> WspiapiLegacyGetAddrInfo<br />Warning W8027 k:\bcc582\include\windows\sdk\wspiapi.h <span style="color: #000000;">831</span>: <span style="color: #000000;">Functions</span> containing <span style="color: #00C800;">switch</span> are not expanded <span style="color: #00C800;">inline</span><br />Warning W8012 k:\bcc582\include\windows\sdk\wspiapi.h <span style="color: #000000;">741</span>: <span style="color: #000000;">Comparing</span> signed and unsigned values in <span style="color: #00C800;">function</span> WspiapiLegacyGetNameInfo<br />Warning W8012 k:\bcc582\include\windows\sdk\wspiapi.h <span style="color: #000000;">747</span>: <span style="color: #000000;">Comparing</span> signed and unsigned values in <span style="color: #00C800;">function</span> WspiapiLegacyGetNameInfo<br />Warning W8027 k:\bcc582\include\windows\sdk\wspiapi.h <span style="color: #000000;">916</span>: <span style="color: #000000;">Functions</span> containing <span style="color: #00C800;">for</span> are not expanded <span style="color: #00C800;">inline</span><br />Warning W8061 k:\bcc582\include\windows\sdk\wspiapi.h <span style="color: #000000;">903</span>: <span style="color: #000000;">Initialization</span> is only partially bracketed in <span style="color: #00C800;">function</span> WspiapiLoad<br />Warning W8061 k:\bcc582\include\windows\sdk\wspiapi.h <span style="color: #000000;">903</span>: <span style="color: #000000;">Initialization</span> is only partially bracketed in <span style="color: #00C800;">function</span> WspiapiLoad<br />Warning W8061 k:\bcc582\include\windows\sdk\wspiapi.h <span style="color: #000000;">903</span>: <span style="color: #000000;">Initialization</span> is only partially bracketed in <span style="color: #00C800;">function</span> WspiapiLoad<br />Warning W8061 k:\bcc582\include\windows\sdk\wspiapi.h <span style="color: #000000;">908</span>: <span style="color: #000000;">Initialization</span> is only partially bracketed in <span style="color: #00C800;">function</span> WspiapiLoad<br />Warning W8061 k:\bcc582\include\windows\sdk\wspiapi.h <span style="color: #000000;">908</span>: <span style="color: #000000;">Initialization</span> is only partially bracketed in <span style="color: #00C800;">function</span> WspiapiLoad<br />Warning W8061 k:\bcc582\include\windows\sdk\wspiapi.h <span style="color: #000000;">908</span>: <span style="color: #000000;">Initialization</span> is only partially bracketed in <span style="color: #00C800;">function</span> WspiapiLoad<br />Warning W8027 k:\bcc582\include\windows\sdk\wspiapi.h <span style="color: #000000;">1006</span>: <span style="color: #000000;">Functions</span> containing <span style="color: #00C800;">static</span> variables are not expanded <span style="color: #00C800;">inline</span> in <span style="color: #00C800;">function</span> WspiapiGetAddrInfo<br />Warning W8027 k:\bcc582\include\windows\sdk\wspiapi.h <span style="color: #000000;">1031</span>: <span style="color: #000000;">Functions</span> containing <span style="color: #00C800;">static</span> variables are not expanded <span style="color: #00C800;">inline</span> in <span style="color: #00C800;">function</span> WspiapiGetNameInfo<br />Warning W8027 k:\bcc582\include\windows\sdk\wspiapi.h <span style="color: #000000;">1049</span>: <span style="color: #000000;">Functions</span> containing <span style="color: #00C800;">static</span> variables are not expanded <span style="color: #00C800;">inline</span> in <span style="color: #00C800;">function</span> WspiapiFreeAddrInfo<br />Error E2238 k:\Harbour\include\clipdefs.h <span style="color: #000000;">80</span>: <span style="color: #000000;">Multiple</span> declaration <span style="color: #00C800;">for</span> <span style="color: #ff0000;">'WORD'</span><br />Error E2228 k:\Harbour\include\clipdefs.h <span style="color: #000000;">80</span>: <span style="color: #000000;">Too</span> many error or warning messages<br />*** <span style="color: #000000;">2</span> errors in Compile ***<br /><br />** error <span style="color: #000000;">2</span> ** deleting obj\MSCTypes.obj<br /><br />&nbsp;</div>[/code:1xal2f7q] Usando bcc582 [code=fw:1xal2f7q]<div class="fw" id="{CB}" style="font-family: monospace;"><br />MAKE Version <span style="color: #000000;">5.2</span> &nbsp;Copyright <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> <span style="color: #000000;">1987</span>, <span style="color: #000000;">2000</span> Borland<br />&nbsp; &nbsp; k:\bcc582\BIN\bcc32 -X -w -g50 -j1 -tWM -d -a8 -OS -O2 <span style="color: #000000;">-5</span> -c -DHB_OS_WIN_32_USED -DHB_GUI -DHB_API_MACROS -DHB_STACK_MACROS -DHB_FM_STATISTICS_OFF -Iinclude;.\msinc;k:\Harbour\include;k:\bcc582\include /nobj source\MSCTypes.c<br />Borland C++ <span style="color: #000000;">5.82</span> <span style="color: #00C800;">for</span> Win32 Copyright <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> <span style="color: #000000;">1993</span>, <span style="color: #000000;">2005</span> Borland<br />source\msctypes.c:<br /><span style="color: #000000;">Warning</span> W8061 k:\bcc582\include\wspiapi.h <span style="color: #000000;">898</span>: <span style="color: #000000;">Initialization</span> is only partially bracketed in <span style="color: #00C800;">function</span> WspiapiLoad<br />Warning W8061 k:\bcc582\include\wspiapi.h <span style="color: #000000;">903</span>: <span style="color: #000000;">Initialization</span> is only partially bracketed in <span style="color: #00C800;">function</span> WspiapiLoad<br />Error E2238 k:\Harbour\include\clipdefs.h <span style="color: #000000;">80</span>: <span style="color: #000000;">Multiple</span> declaration <span style="color: #00C800;">for</span> <span style="color: #ff0000;">'WORD'</span><br />Error E2228 k:\Harbour\include\clipdefs.h <span style="color: #000000;">80</span>: <span style="color: #000000;">Too</span> many error or warning messages<br />*** <span style="color: #000000;">2</span> errors in Compile ***<br /><br />** error <span style="color: #000000;">1</span> ** deleting obj\MSCTypes.obj<br />&nbsp;</div>[/code:1xal2f7q]
eagle fw + mysql
Chicos, chicos... ¿por qué no os poneis en contacto con su creador? o sea, Manu Expósito, o sea yo <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> <!-- s:roll: --><img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" /><!-- s:roll: -->
eagle fw + mysql
Manu, eso fue lo que le indiqué en mi post [quote:16ieejv7] Por el foro, suele conectarse su autor [/quote:16ieejv7] Saludos
eagle fw + mysql
Saludos Estoy actualizando mi aplicacion con FWH17.02 utilizo Eagle para MySQL, estoy interesado en la ultima version de esta excelente libreria, agradecido de su ubicación de descarga. Tambien necesito reemplazar rmake, por make (agradezco un ejemplo) de su utilización.
eagle fw + mysql
Tienes suerte porque voy a poner una [color=#FF0000:203niucl]"oferta de primavera"[/color:203niucl] - Eagle1 - TCRDD (antigua TDBF PRO) - HDO con la RDL de SQLite Funcionado con FWH 17.02 y posteriores [color=#0000FF:203niucl]Por sólo 50 euros[/color:203niucl]
eagle fw + mysql
Manu, puedes poner un ejemplo muy sencillo de uso de eagle con TXBrowse, muy simple conexión y ver la tabla? Saludos
eagle fw + mysql
Gracias Si es posible un ejemplo de un ABM y TxBrowse con la Eagle1 V 3.00 ????
eagle fw + mysql
Hi Cristobal... Sé que tengo ejemplos pero no recuerdo donde, tendría que pararme para hacerlo. De cualquier modo es muy fácil sólo habrá que definir los codeblock de movimiento. Con Eagle1 hay un fuente con eso para todos los browses de FWH: [code=fw:23quv1go]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//---------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">// Asigna los codeblock de movimiento a un Browse</span><br /><br /><span style="color: #00C800;">function</span> MySetBrowse<span style="color: #000000;">&#40;</span> oBrw, oDataSource <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> lRet := .t.<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> bGoTop, bGoBottom, bSkipper<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> cClsName<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> !<span style="color: #000000;">&#40;</span> ValType<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"O"</span> <span style="color: #000000;">&#41;</span> .or. !<span style="color: #000000;">&#40;</span> ValType<span style="color: #000000;">&#40;</span> oDataSource <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"O"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; lRet := .f.<br />&nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; bGoTop := <span style="color: #000000;">&#123;</span> || oDataSource:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; bGoBottom := <span style="color: #000000;">&#123;</span> || oDataSource:<span style="color: #000000;">GoBottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; bSkipper := <span style="color: #000000;">&#123;</span> | n | oDataSource:<span style="color: #000000;">Skipper</span><span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; cClsName := upper<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">ClassName</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> cClsName == <span style="color: #ff0000;">"TBROWSE"</span> <span style="color: #B900B9;">// El nativo de Harbour y xHarbour</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">goTopBlock</span> := bGoTop<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">goBottomBlock</span> := bGoBottom<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">SkipBlock</span> := bSkipper<br />&nbsp; &nbsp; &nbsp; &nbsp; elseif cClsName $ <span style="color: #ff0000;">"TWBROWSE TCBROWSE TSBROWSE TGRID TXBROWSE"</span> <span style="color: #B900B9;">// Para windows</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">bGoTop</span> := bGoTop<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">bGoBottom</span> := bGoBottom<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">bSkip</span> := bSkipper<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> cClsName == <span style="color: #ff0000;">"TXBROWSE"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">bBof</span> := <span style="color: #000000;">&#123;</span> || oDataSource:<span style="color: #000000;">Bof</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">bEof</span> := <span style="color: #000000;">&#123;</span> || oDataSource:<span style="color: #000000;">Eof</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">bBookMark</span> :=<span style="color: #000000;">&#123;</span> | n | <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> n == <span style="color: #00C800;">nil</span>, oDataSource:<span style="color: #000000;">RecNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oDataSource:<span style="color: #000000;">GoTo</span><span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">bKeyNo</span> := &nbsp;<span style="color: #000000;">&#123;</span> || oDataSource:<span style="color: #000000;">RecNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">bKeyCount</span> := <span style="color: #000000;">&#123;</span> || oDataSource:<span style="color: #000000;">RecCount</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBRw:<span style="color: #000000;">nDataType</span> := <span style="color: #000000;">4096</span> <span style="color: #B900B9;">// DATATYPE_USER // 64 &nbsp;DATATYPE_MYSQL</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">bLogicLen</span> := <span style="color: #000000;">&#123;</span> || oDataSource:<span style="color: #000000;">RecCount</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> !<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">oVScroll</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> == <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">oVscroll</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">SetRange</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, oDataSource:<span style="color: #000000;">RecCount</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oDataSource:<span style="color: #000000;">oError</span>:<span style="color: #0000ff;">Say</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Browse no implementado en SetBrowse"</span>, .f. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span> lRet <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br />&nbsp;</div>[/code:23quv1go]
eagle fw + mysql
Manu, sólo me refería a la definición del TXBrowse una vez realizada la conexión, es lo que quería ver Saludos
eagle fw + mysql
Un ejemplo sencillo, sin mucho argot tecnico es posible?
ean13 en report
Hola amigos del foro Utilizo la libreria BARCODE para generar codigos de barra EAN13 poro por medio de PRINT oPrn... y por medio de la siguiente instruccion @ F,C ean13 SUBSTR(INVENT->BARCODE,1,12) SIZE 1 of oPrn BANNER Como utilizo BARCODE en un REPORT... para que el codigo de barra se genere en una columna del reporte Gracias por su ayuda
ean13 en report
Hola, es sencillo, tan solo busca una fuente (TTF) de EAN13 y lo demas es igual a como lo estas haciendo hasta ahora, para esa columna utiliza la fuente saludos Marcelo
ean13 en report
El problema con esta solucion es que la altura del codigo de barra generado. No hay suficiente espacio entre las filar del report y quedan sobrepuestos... Alguna solucion ? Gracias
ean13 en report
Define el tamaño de la fuenta al definirla para el reporte, yo creo que puedes achatarla, lo intentaste?
ean13 en report
Como ???
ean13 en report
Jose, [url:3t0cv195]http&#58;//www&#46;fivetechsoft&#46;com/wiki/doku&#46;php?id=fivewin_commands_fonts[/url:3t0cv195] prueba al definir el font el ancho y el alto
easyreport
Gente: tengo una duda el easyreport.exe que esta en el fivebucket esta operativo porque el diseñador de reportes bota errores al usarse (o debo de compilar los fuentes con el que viene? ) Por otro lado hay un correo de antonio el cual pidio un donativo para comprar el easyreport, sigue en pie ello?
easyreport
Arturo, Ya se compró EasyReport, lo que ocurre es que aun no está teniendo muchos usuarios. Otto es posiblemente quien mejor lo conoce pues está acostumbrado a usarlo.
easyreport
Gracias Antonio, haré la pregunta a Otto
easyreport error in number of copies
HI, i am using easyreport suplied with fwh, when in number of copies is only 1, works fine, but if put more ( 2, 3 copies), print the first page fine, and anothers with trash. theres any solution for this? thanks
easyreport problems
Hi, someone test easyreport with last fwh and cvs xharbour, i use for several years, but in last versions of fwh and xharbour several things ocour, ex: when changes number of copies, easyreport dont respect... theres an updated source code of easyreport?? thanks
edicion con Xbrowser
Quiero poder consultar y editar rapido unos datos. Si uso xbrowser a secas no me permite su edición . Si pongo FASTEDIT o SETUP ( oBrw:nEditTypes := EDIT_GET ) si permite la edición lo que pasa que permite la edición "en linea" Quiero poder hacer la edición pero solo desde el "boton" de editar... ¿ como tengo que ponerlo ? [code=fw:mj65iozc]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />  <span style="color: #00C800;">local</span> cOrdenes := Abrimos<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"ordenes"</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #000000;">&#40;</span> cOrdenes <span style="color: #000000;">&#41;</span>-> <span style="color: #000000;">&#40;</span>OrdSetFocus<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />    XBROWSER AUTOSORT  <span style="color: #B900B9;">//SETUP ( oBrw:nEditTypes := EDIT_GET )</span><br />   close <span style="color: #000000;">&#40;</span> cOrdenes <span style="color: #000000;">&#41;</span><br /><br /> </div>[/code:mj65iozc]
edicion con Xbrowser
Manuel Tendrías que hacerlo por columna no colocar el FastEdit [code=fw:jhcf7720]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oCol:=oBrw:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oCol:<span style="color: #000000;">bStrData</span> &nbsp;:= <span style="color: #000000;">&#123;</span> || NOMBRE <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;oCol:<span style="color: #000000;">cHeader</span>:= <span style="color: #ff0000;">"NOMBRE"</span><br />&nbsp; &nbsp;oCol:<span style="color: #000000;">nWidth</span>:=<span style="color: #000000;">150</span><br />&nbsp; &nbsp;oCol:<span style="color: #000000;">cSortOrder</span>:=<span style="color: #ff0000;">"NOMBRE"</span><br />&nbsp; &nbsp;oCol:<span style="color: #000000;">nEditType</span> := EDIT_GET<br />&nbsp; &nbsp;oCol:<span style="color: #000000;">bOnPostEdit</span> := <span style="color: #000000;">&#123;</span>|o, v, n| NOMBRE:=v <span style="color: #000000;">&#125;</span><br /><span style="color: #B900B9;">//Sólo funciona al pulsar Enter</span><br /><span style="color: #B900B9;">//Podemos agregar otras teclas por Ej. F2</span><br />&nbsp; oBrw:<span style="color: #000000;">bKeyDown</span>:=<span style="color: #000000;">&#123;</span> |nKey| iif<span style="color: #000000;">&#40;</span>nKey=VK_F2, __KeyBoard<span style="color: #000000;">&#40;</span>Chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">13</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> , <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:jhcf7720] Saludos, Adhemar
edicion con Xbrowser
Manuel, Ahora que te pillo por aquí y con xBrowse, siendo tu un master de las imágenes... He probado un xBrowse mostrando imagenes que originalmente estan en formato .jpg y su tamaño es 800 x 800. Las muestro en un tamaño de 33 pix, y las muestra bien, pero el xbrowse se vuelve horriblemente lento... creo que el problema puede estar en la filoadimg() que tiene que hacer conversiones... y muchas... tantas como el xBrowse lo invoca. ¿ Crees que el problema es el que te indico ? ¿ Algun workaround ? Saludos
edicion con Xbrowser
[quote="hmpaquito":2l819evo]Manuel, Ahora que te pillo por aquí y con xBrowse, siendo tu un master de las imágenes... He probado un xBrowse mostrando imagenes que originalmente estan en formato .jpg y su tamaño es 800 x 800. Las muestro en un tamaño de 33 pix, y las muestra bien, pero el xbrowse se vuelve horriblemente lento... creo que el problema puede estar en la filoadimg() que tiene que hacer conversiones... y muchas... tantas como el xBrowse lo invoca. ¿ Crees que el problema es el que te indico ? ¿ Algun workaround ? Saludos[/quote:2l819evo] Dos cosas ... 1ª¿ es necesario enseñar las miniaturas en las celdas del xbrowse o servirí algo asi ?: [img:2l819evo]http&#58;//i58&#46;tinypic&#46;com/30ji7g9&#46;jpg[/img:2l819evo] 2º si es necesario enseñar todas las miniaturas sería mucho mas rápido adaptar el xbrowse para que en vez usar filoadimg() para cargar los jpg use gdi+ y las reduzca a 33pix al vuelo , si el ordenador es medianamente moderno , eso aceleraría el xbrowse . la funcion equivalente seria : La funcion seria hBmpFromFile( cFile, nWith, nHeight ) en tu caso hBmpFromFile( cFile, 33 )
edicion con Xbrowser
Manuel, Qué buena idea... me sirve de la primera forma, incluso me viene mejor. Muchas gracias. saludos pd. Desconocia la existencia de hBmpFromFile(). Supongo que esa funcion deberia ser incorporada al xBrowse para darle mayor velocidad.
edicion con Xbrowser
Manuel, Pensando mejor sobre la segunda posibilidad y su solucion, creo que la solucion pasa por modificar el xBrowse para [b:35357q88]re-utilizar los hBmp[/b:35357q88], sea-la-funcion-de-lectura-del-jpg-la-que-sea. La solucion pasaria por utilizar un hash con el nombre de la imagen a la que se le asignaria el hBmp. En oBrw:Destroy() se borrarian (deleteobject()) los hBmp. Asimismo, el calculo del HasAlpha() puede enlentecer... también se guardaría en el hash, de modo que el hash contendria tuplas con el siguiente valor {hBmp, lAlpha} Saludos
edicion con Xbrowser
A mi me funciona perfectamente sin añadir nada ( ni en el SETUP ), pero solo lo he usado con arrays Edito con el boton de edicion nada mas --------------------------------------- EDITADO ------------------------------------------ Lo he comprobado y no permite editar con bases de datos
edicion con Xbrowser
[quote="mastintin":vtucb562]Quiero poder consultar y editar rapido unos datos. Si uso xbrowser a secas no me permite su edición . Si pongo FASTEDIT o SETUP ( oBrw:nEditTypes := EDIT_GET ) si permite la edición lo que pasa que permite la edición "en linea" Quiero poder hacer la edición pero solo desde el "boton" de editar... ¿ como tengo que ponerlo ? [code=fw:vtucb562]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />  <span style="color: #00C800;">local</span> cOrdenes := Abrimos<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"ordenes"</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #000000;">&#40;</span> cOrdenes <span style="color: #000000;">&#41;</span>-> <span style="color: #000000;">&#40;</span>OrdSetFocus<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />    XBROWSER AUTOSORT  <span style="color: #B900B9;">//SETUP ( oBrw:nEditTypes := EDIT_GET )</span><br />   close <span style="color: #000000;">&#40;</span> cOrdenes <span style="color: #000000;">&#41;</span><br /><br /> </div>[/code:vtucb562][/quote:vtucb562] Please try: [code=fw:vtucb562]<div class="fw" id="{CB}" style="font-family: monospace;"><br />XBROWSER <span style="color: #0000ff;">Alias</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> SETUP oBrw:<span style="color: #000000;">bDataRow</span> := <span style="color: #000000;">&#123;</span> |o,c,l| TDataRow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> o:<span style="color: #000000;">uDataSource</span>, c, l <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:vtucb562]
edicion con Xbrowser
Ok, So it works well Thanks
edicion con Xbrowser
My solution is for the specific rather uncommon requirement of Mr Manuel. For all normal purposes XBROWSER <anydata> FASTEDIT or XBROWSER <anydata> AUTOSORT SETUP oBrw:nEditTypes := EDIT_DATA work well for viewing and editing any data
edicion con Xbrowser
Mr Rao Yo pienso que por defecto se deberia permitir editar con el boton "Edit" y usar FASTEDIT para Editar directamente si el usuario elige esa opcion O implementar dos opciones distintas Mr Rao I think we should allow default edit the "Edit" button and use FASTEDIT to Edit directly if the user chooses that option Or implement two different options FASTEDIT and ....EDIT..
edicion con Xbrowser
¡¡Perfecto Sr.Rao !!!. Gracias. Respecto al comportamiento creo que está bien que no permita editar por defecto pero deberiamos implementar un comando EDIT . Mi propuesta para no mover casi el codigo es que el parametro lFastEdit pase a ser nEdit ... nEdit := 0 -> no editable nEdit:= 1 -> lFastEdit:= .t. nEdit:= 2 -> editable comandos a usar EDIT AND FASTEDIT seria algo asi : # xcommand XBROWSER [<uData>] ; [ TITLE <cTitle> ] ; [ <autosort:AUTOSORT> ] ; [ SETUP <fnSetUp> ] ; [ COLUMNS <aCols,...> ] ; [ SELECT <fnSelect> ] ; [ <excel: CALC> ]; [ FASTEDIT] [ <nEdit: 1> ] ; [ EDIT ] [ <nEdit: 2> ] ; [ VALID <uValid> ] ; [ [SHOW] <sl: RECID,SLNUM> ] ; => ; XBrowse( [<uData>], [<cTitle>], [<.autosort.>], ; [\{|oBrw|<fnSetUp>\}], [\{<aCols>\}], ; [\{|oBrw,oCol|<fnSelect>\}],!<.excel.>, <nEdit>, [\{|oBrw|<uValid>\}], <(sl)> ) cambios en codigo de xbrowser ... function XBrowse( uData, cTitle, lAutoSort, bSetUp, aCols, bSelect, lExcel, nEdit, ; bValid, cSerial ) DEFAULT nEdit:= 0 ....... line 117+- XBrwSetDataSource( oBrw, uData, lAddCols, lAutoSort, aCols ) // function in XBrowse.Prg AEval( oBrw:aCols, { |o| If( o:cDataType == 'L', o:SetCheck(), nil ) } ) if nEdit == 1 oBrw:lFastEdit := .t. AEval( oBrw:aCols, { |o| o:nEditType := 1 } ) elseif nEdit == 2 oBrw:bDataRow := { |o,c,l| TDataRow():New( o:uDataSource, c, l ) } endif ...... Todo esto esta planteado al vuelo , como idea, no está probado ya que ahora mismo no estoy sobre el ordenador ...
edicion con Xbrowser
Hola amigos, necesito hacer un Xbrowser o xBrowse emulando al viejo DBU donde se podía modificar los campos de una dbf, y no lo puedo hacer. Probé con FASTEDIT, SETUP y todo lo que sugieren pero no lo puedo hacer que me edite y grabe. Quien me pueda ayudar se lo agradeceré! Roberto
edicion con Xbrowser
[quote="TOTOVIOTTI":1wdc9otm]Hola amigos, necesito hacer un Xbrowser o xBrowse emulando al viejo DBU donde se podía modificar los campos de una dbf, y no lo puedo hacer. Probé con FASTEDIT, SETUP y todo lo que sugieren pero no lo puedo hacer que me edite y grabe. Quien me pueda ayudar se lo agradeceré! Roberto[/quote:1wdc9otm] Coloca codigo de como definistes el xBrowse para poder ayudarte, gracias...saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
edicion con Xbrowser
Disculpas... pero uso de la siguiente manera: XBROWSER cAlias FASTEDIT Gracias Roberto
edicion con Xbrowser
[quote="TOTOVIOTTI":pq78rr0c]Disculpas... pero uso de la siguiente manera: XBROWSER cAlias FASTEDIT Gracias Roberto[/quote:pq78rr0c] Intenta asi haber, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> [code=fw:pq78rr0c]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oDlg ;<br />DATASOURCE cAlias FASTEDIT<br /><br />WITH OBJECT oBrw<br /> :<span style="color: #000000;">nEditTypes</span> := EDIT_GET<br /> :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />END<br /> </div>[/code:pq78rr0c] <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=33970&p=202717&hilit=xbrowser#p202717">viewtopic.php?f=3&t=33970&p=202717&hilit=xbrowser#p202717</a><!-- l --> <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=16&t=34095&p=202220&hilit=xbrowser#p202220">viewtopic.php?f=16&t=34095&p=202220&hilit=xbrowser#p202220</a><!-- l -->
edit a cell of a xbrowse
I build a dialog to create matrices that I need to create reduced systems [img:3b0lqr3n]https&#58;//i&#46;postimg&#46;cc/bJ7NSTws/matrix&#46;png[/img:3b0lqr3n] at the beginning I create an xbrowse with three columns and one row the rows are the combinations of the matrix and I can edit any cell,insert a number and then press return problems arise when I add rows or columns the columns can be max 10 while the rows can be infinite depending on the system that the user creates when I create rows I made [code=fw:3b0lqr3n]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> AddRow<span style="color: #000000;">&#40;</span> oBrw,nRow <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> nTotal  := oBrw:<span style="color: #000000;">nDataRows</span><br /><br />   <span style="color: #00C800;">IF</span> nRow < nTotal<br />      DeleteRow<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">ELSE</span><br />      AAdd<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aArrayData</span>, BlankRow<span style="color: #000000;">&#40;</span>nRow<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />       oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />       oBrw:<span style="color: #000000;">GoBottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">Endif</span><br />   <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:3b0lqr3n] when I create columns I made [code=fw:3b0lqr3n]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> AddCol<span style="color: #000000;">&#40;</span> oBrw,nCol <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> nTotal  := len<span style="color: #000000;">&#40;</span>oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> nPos    := nTotal<br /><br />   <span style="color: #00C800;">IF</span> nCol < nTotal<br />      oBrw:<span style="color: #000000;">DelCol</span><span style="color: #000000;">&#40;</span> nTotal <span style="color: #000000;">&#41;</span><br />       oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">else</span><br />         <span style="color: #00C800;">IF</span> nCol <= <span style="color: #000000;">10</span><br />            ADD COLUMN <span style="color: #0000ff;">TO</span> <span style="color: #0000ff;">XBROWSE</span>  oBrw<br />         <span style="color: #00C800;">Endif</span><br />      <span style="color: #00C800;">Endif</span><br /><br /><br />      <span style="color: #00C800;">For</span> n=<span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span>oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#41;</span><br />         oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cheader</span> :=ltrim<span style="color: #000000;">&#40;</span>str<span style="color: #000000;">&#40;</span>n<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />         oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nWidth</span>   := <span style="color: #000000;">30</span><br />         oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nEditType</span> := EDIT_GET<br />      <span style="color: #00C800;">Next</span><br /><br />   oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oBrw:<span style="color: #000000;">GoBottom</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:3b0lqr3n] any solution please ?
edit a cell of a xbrowse
Try this sample as it is and then apply to your requirements. [code=fw:148z5jwf]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aData := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">3</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">4</span>,<span style="color: #000000;">5</span>,<span style="color: #000000;">6</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oBrw, oFont<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nRows &nbsp; &nbsp;:= Len<span style="color: #000000;">&#40;</span> aData <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nCols &nbsp; &nbsp;:= Len<span style="color: #000000;">&#40;</span> aData<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-15</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">880</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL <span style="color: #0000ff;">FONT</span> oFont<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">20</span>,<span style="color: #000000;">140</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-20</span>,<span style="color: #000000;">-20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; DATASOURCE aData <span style="color: #0000ff;">AUTOCOLS</span> CELL LINES NOBORDER FASTEDIT<br /><br />&nbsp; &nbsp;WITH OBJECT oBrw<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">RecSelShowKeyNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; AEval<span style="color: #000000;">&#40;</span> :<span style="color: #000000;">aCols</span>, <span style="color: #000000;">&#123;</span> |o,i| o:<span style="color: #000000;">cHeader</span> := LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> i, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nEditTypes</span> &nbsp; &nbsp;:= EDIT_GET<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nWidths</span> &nbsp; &nbsp; &nbsp; := <span style="color: #000000;">60</span><br />&nbsp; &nbsp;END<br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">40</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">GET</span> nRows <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg SPINNER <span style="color: #0000ff;">MIN</span> <span style="color: #000000;">2</span> <span style="color: #0000ff;">MAX</span> <span style="color: #000000;">100</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> ResizeArray<span style="color: #000000;">&#40;</span> oBrw, nRows, nCols <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">90</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">GET</span> nCols <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg SPINNER <span style="color: #0000ff;">MIN</span> <span style="color: #000000;">2</span> <span style="color: #0000ff;">MAX</span> <span style="color: #000000;">10</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> ResizeArray<span style="color: #000000;">&#40;</span> oBrw, nRows, nCols <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br />&nbsp; &nbsp;XBROWSER aData<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> ResizeArray<span style="color: #000000;">&#40;</span> oBrw, nRows, nCols <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aData &nbsp; &nbsp;:= oBrw:<span style="color: #000000;">aArrayData</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> iRows, iCols, n<br /><br />&nbsp; &nbsp;iCols := Len<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aCols</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> iRows := oBrw:<span style="color: #000000;">nLen</span> <span style="color: #000000;">&#41;</span> != nRows .or. iCols != nCols<br /><br />&nbsp; &nbsp; &nbsp; ASize<span style="color: #000000;">&#40;</span> aData, nRows <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> nCols != iCols<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AEval<span style="color: #000000;">&#40;</span> aData, <span style="color: #000000;">&#123;</span> |a| ASize<span style="color: #000000;">&#40;</span> a, nCols <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nCols > iCols, AFill<span style="color: #000000;">&#40;</span> a, <span style="color: #000000;">0</span>, iCols + <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">1</span>, <span style="color: #0000ff;">Min</span><span style="color: #000000;">&#40;</span> iRows, nRows <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">for</span> n := iRows + <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> nRows<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aData<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> &nbsp;:= Array<span style="color: #000000;">&#40;</span> nCols <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AFill<span style="color: #000000;">&#40;</span> aData<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">next</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">//</span><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">SetArray</span><span style="color: #000000;">&#40;</span> aData, .f., <span style="color: #000000;">0</span>, .t. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; WITH OBJECT oBrw<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AEval<span style="color: #000000;">&#40;</span> :<span style="color: #000000;">aCols</span>, <span style="color: #000000;">&#123;</span> |o,i| o:<span style="color: #000000;">cHeader</span> := LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> i, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">nEditTypes</span> &nbsp; &nbsp;:= EDIT_GET<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">nWidths</span> &nbsp; &nbsp; &nbsp; := <span style="color: #000000;">60</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">lFastEdit</span> &nbsp; &nbsp; := .t.<br />&nbsp; &nbsp; &nbsp; END<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br />&nbsp;</div>[/code:148z5jwf]
edit a cell of a xbrowse
[size=200:2p9bt30k][b:2p9bt30k]Fantastic You're Greate[/b:2p9bt30k][/size:2p9bt30k]
edit a cell of a xbrowse
This is another variant. Please check: [code=fw:1h1hipsh]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aData := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">3</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">4</span>,<span style="color: #000000;">5</span>,<span style="color: #000000;">6</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oBrw, oFont<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nRows &nbsp; &nbsp;:= Len<span style="color: #000000;">&#40;</span> aData <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nCols &nbsp; &nbsp;:= Len<span style="color: #000000;">&#40;</span> aData<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nMaxCols := <span style="color: #000000;">10</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> nMaxCols > nCols<br />&nbsp; &nbsp; &nbsp; AEval<span style="color: #000000;">&#40;</span> aData, <span style="color: #000000;">&#123;</span> |aRow| ASize<span style="color: #000000;">&#40;</span> aRow, nMaxCols <span style="color: #000000;">&#41;</span>, AFill<span style="color: #000000;">&#40;</span> aRow, <span style="color: #000000;">0</span>, nCols + <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-15</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">880</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL <span style="color: #0000ff;">FONT</span> oFont<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">20</span>,<span style="color: #000000;">140</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-20</span>,<span style="color: #000000;">-20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; DATASOURCE aData <span style="color: #0000ff;">AUTOCOLS</span> CELL LINES NOBORDER FASTEDIT<br /><br />&nbsp; &nbsp;WITH OBJECT oBrw<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">RecSelShowKeyNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; AEval<span style="color: #000000;">&#40;</span> :<span style="color: #000000;">aCols</span>, <span style="color: #000000;">&#123;</span> |o,i| o:<span style="color: #000000;">cHeader</span> := LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> i, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, o:<span style="color: #000000;">lHide</span> := i > nCols <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nEditTypes</span> &nbsp; &nbsp;:= EDIT_GET<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nWidths</span> &nbsp; &nbsp; &nbsp; := <span style="color: #000000;">60</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lAllowColHiding</span> &nbsp; &nbsp; := .f.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lAllowColSwapping</span> &nbsp; := .f.<br />&nbsp; &nbsp;END<br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">40</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">GET</span> nRows <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg SPINNER <span style="color: #0000ff;">MIN</span> <span style="color: #000000;">2</span> <span style="color: #0000ff;">MAX</span> <span style="color: #000000;">100</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> ResizeRows<span style="color: #000000;">&#40;</span> oBrw, nRows <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">90</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">GET</span> nCols <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg SPINNER <span style="color: #0000ff;">MIN</span> <span style="color: #000000;">2</span> <span style="color: #0000ff;">MAX</span> <span style="color: #000000;">10</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">&#40;</span> AEval<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aCols</span>, <span style="color: #000000;">&#123;</span> |o,i| o:<span style="color: #000000;">lHide</span> := i > nCols <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> Len<span style="color: #000000;">&#40;</span> aData <span style="color: #000000;">&#41;</span> > nRows<br />&nbsp; &nbsp; &nbsp; ASize<span style="color: #000000;">&#40;</span> aData, nRows <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> Len<span style="color: #000000;">&#40;</span> aData<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> > nCols<br />&nbsp; &nbsp; &nbsp; AEval<span style="color: #000000;">&#40;</span> aData, <span style="color: #000000;">&#123;</span> |a| ASize<span style="color: #000000;">&#40;</span> a, nCols <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;XBROWSER aData<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> ResizeRows<span style="color: #000000;">&#40;</span> oBrw, nRows <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> Len<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aArrayData</span> <span style="color: #000000;">&#41;</span> < nRows<br />&nbsp; &nbsp; &nbsp; AAdd<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aArrayData</span>, Array<span style="color: #000000;">&#40;</span> Len<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; AFill<span style="color: #000000;">&#40;</span> ATail<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aArrayData</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">enddo</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> nRows < Len<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aArrayData</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">bKeyCount</span> &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> || nRows <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">bKeyCount</span> &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> || Len<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aArrayData</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br />&nbsp;</div>[/code:1h1hipsh]
edit a cell of a xbrowse
I have problems, i saw the test tonight. First the Array must be empty and only 1x3. Then I cannot stop the resizing of Columms and Roses. I insert Aldo The commands lallow....:=.f. but not run ok. And Inot now how resolved. Then when I edit It take the valute only of I Press return. If I move with mouse and digit Numbers then It not save the valute on Cell .
edit a cell of a xbrowse
i do not understand you clearly. Please explain point by point clearly.
edit a cell of a xbrowse
[quote="nageswaragunupudi":dgzccz1y]i do not understand you clearly. Please explain point by point clearly.[/quote:dgzccz1y] Sorry I wrote it from my smartphone while driving...... I explain you This is my test (with your functions) [code=fw:dgzccz1y]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"constant.ch"</span><br /><br /><span style="color: #00C800;">function</span> Matrix<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> oDlg, oBrw, oFont, oBold, oFontGet<br /><span style="color: #00C800;">local</span> nBottom   := <span style="color: #000000;">33</span><br /><span style="color: #00C800;">local</span> nRight    := <span style="color: #000000;">80</span><br /><span style="color: #00C800;">local</span> nWidth    := <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> nRight * DLG_CHARPIX_W, <span style="color: #000000;">180</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> nHeight   := nBottom * DLG_CHARPIX_H<br /><span style="color: #00C800;">local</span> oPanelTitle<br /><span style="color: #00C800;">local</span> oGrp:=array<span style="color: #000000;">&#40;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">local</span> oBtnClose,oBtnSave,oBtnPrint<br /><span style="color: #00C800;">local</span> oBtnReset,oBtnInsert<br /><br />   <span style="color: #00C800;">local</span> aData     :=  <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">3</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>   <span style="color: #B900B9;">//, { 4,5,6 }       {}</span><br />   <span style="color: #00C800;">local</span> nRows     := Len<span style="color: #000000;">&#40;</span> aData <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> nCols     := Len<span style="color: #000000;">&#40;</span> aData<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> nNumbers  :=<span style="color: #000000;">10</span><br />   <span style="color: #00C800;">local</span> nGuarantee:= <span style="color: #000000;">1</span><br />   <span style="color: #00C800;">local</span> nPoints   := <span style="color: #000000;">1</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-10</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oBold <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-12</span>  BOLD<br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFontGet <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-14</span><br /><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span>  nWidth, nHeight  ;<br />   <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL  <span style="color: #0000ff;">FONT</span> oFont   ;  <span style="color: #B900B9;">//RESIZABLE</span><br />   <span style="color: #0000ff;">TiTle</span> <span style="color: #ff0000;">"Manage Matrix"</span><br /><br /><br /><br /> @ <span style="color: #000000;">70</span>, <span style="color: #000000;">180</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">395</span>,<span style="color: #000000;">300</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />      DATASOURCE aData <span style="color: #0000ff;">AUTOCOLS</span> CELL LINES NOBORDER FASTEDIT<br /><br />           SetupBrowseMatrix<span style="color: #000000;">&#40;</span>oBrw<span style="color: #000000;">&#41;</span><br /><br /><br />    @ <span style="color: #000000;">70</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Total quantity of numbers"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFont<br />    @ <span style="color: #000000;">160</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Development (nr. for  column)"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFont<br />    @ <span style="color: #000000;">230</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Combinations"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFont<br />    @ <span style="color: #000000;">340</span>,<span style="color: #000000;">7</span> <span style="color: #0000ff;">SAY</span>  <span style="color: #ff0000;">"Guarantee"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFont<br />    @ <span style="color: #000000;">340</span>,<span style="color: #000000;">130</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"points"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">30</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFont<br />    @ <span style="color: #000000;">375</span>,<span style="color: #000000;">7</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"width"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFont<br />    @ <span style="color: #000000;">375</span>,<span style="color: #000000;">130</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"numbers"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">35</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFont<br /><br /><br />   @ <span style="color: #000000;">90</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">GET</span> nNumbers <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span>;<br />             SPINNER <span style="color: #0000ff;">MIN</span> <span style="color: #000000;">5</span> <span style="color: #0000ff;">MAX</span> <span style="color: #000000;">90</span>  <span style="color: #0000ff;">OF</span> oDlg  ;<br />             <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"99"</span>   <span style="color: #0000ff;">FONT</span> oFontGet<br /><br />   @ <span style="color: #000000;">250</span> ,<span style="color: #000000;">10</span> <span style="color: #0000ff;">GET</span> nRows <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg SPINNER <span style="color: #0000ff;">MIN</span> <span style="color: #000000;">2</span> <span style="color: #0000ff;">MAX</span> <span style="color: #000000;">100</span> ;<br />      <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> ResizeArray<span style="color: #000000;">&#40;</span> oBrw, nRows, nCols <span style="color: #000000;">&#41;</span>  <span style="color: #0000ff;">FONT</span> oFontGet<br /><br />   @ <span style="color: #000000;">180</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">GET</span> nCols <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg SPINNER <span style="color: #0000ff;">MIN</span>  <span style="color: #000000;">3</span> <span style="color: #0000ff;">MAX</span> <span style="color: #000000;">10</span> ;<br />      <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> ResizeArray<span style="color: #000000;">&#40;</span> oBrw, nRows, nCols <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">FONT</span> oFontGet<br /><br />    @ <span style="color: #000000;">335</span> ,<span style="color: #000000;">55</span> <span style="color: #0000ff;">GET</span> nGuarantee <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span>;<br />             SPINNER <span style="color: #0000ff;">MIN</span> <span style="color: #000000;">1</span>  <span style="color: #0000ff;">MAX</span> <span style="color: #000000;">10</span>  <span style="color: #0000ff;">OF</span> oDlg  ;<br />             <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"99"</span>  <span style="color: #0000ff;">FONT</span> oFontGet<br /><br />     @ <span style="color: #000000;">370</span> ,<span style="color: #000000;">55</span> <span style="color: #0000ff;">GET</span> nPoints  <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span>;<br />             SPINNER <span style="color: #0000ff;">MIN</span> <span style="color: #000000;">1</span>  <span style="color: #0000ff;">MAX</span> <span style="color: #000000;">10</span>  <span style="color: #0000ff;">OF</span> oDlg  ;<br />             <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"99"</span>  <span style="color: #0000ff;">FONT</span> oFontGet<br /><br /><br /><br />    @ <span style="color: #000000;">50</span>,<span style="color: #000000;">175</span> GROUP oGrp<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">To</span> <span style="color: #000000;">410</span>,oDlg:<span style="color: #000000;">nWidth</span><span style="color: #000000;">-20</span> Label <span style="color: #ff0000;">"Matrix"</span> TRANSPARENT <span style="color: #0000ff;">PIXEL</span>  <span style="color: #0000ff;">OF</span> oDlg<br />    @ <span style="color: #000000;">50</span>,<span style="color: #000000;">2</span>   GROUP oGrp<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">To</span> <span style="color: #000000;">300</span>,<span style="color: #000000;">170</span> Label <span style="color: #ff0000;">"Reduced System"</span> TRANSPARENT <span style="color: #0000ff;">PIXEL</span>  <span style="color: #0000ff;">OF</span> oDlg<br />    @ <span style="color: #000000;">310</span>,<span style="color: #000000;">2</span> GROUP oGrp<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">To</span> <span style="color: #000000;">410</span>,<span style="color: #000000;">170</span> Label <span style="color: #ff0000;">"Guarantee"</span> TRANSPARENT <span style="color: #0000ff;">PIXEL</span>  <span style="color: #0000ff;">OF</span> oDlg<br /><br /><br /><br /><br />     @ <span style="color: #000000;">100</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> oBtnReset <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Reset"</span> <span style="color: #0000ff;">of</span> oDlg    <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">22</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #00C800;">NIL</span><br />     @ <span style="color: #000000;">100</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> oBtnInsert <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Insert"</span> <span style="color: #0000ff;">of</span> oDlg  <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">22</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #00C800;">NIL</span><br />     @ <span style="color: #000000;">100</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> oBtnPrint <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Print"</span> <span style="color: #0000ff;">of</span> oDlg  <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">22</span> <span style="color: #0000ff;">ACTION</span> oBrw:<span style="color: #000000;">Report</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />     @ <span style="color: #000000;">100</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> oBtnClose <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Close"</span> <span style="color: #0000ff;">of</span> oDlg  <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">22</span> <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />     @ <span style="color: #000000;">100</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> oBtnSave  <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Save"</span>  <span style="color: #0000ff;">of</span> oDlg  <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">22</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #00C800;">NIL</span><br /><br /><br />  oDlg:<span style="color: #000000;">bResized</span> := <||<br />                <span style="color: #00C800;">local</span> oRect := oDlg:<span style="color: #000000;">GetCliRect</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />                oBtnPrint:<span style="color: #000000;">nLeft</span>    := oRect:<span style="color: #000000;">nRight</span> - <span style="color: #000000;">200</span><br />                oBtnPrint:<span style="color: #000000;">nTop</span>     := oRect:<span style="color: #000000;">nBottom</span> - <span style="color: #000000;">45</span><br />                oBtnClose:<span style="color: #000000;">nLeft</span>    := oRect:<span style="color: #000000;">nRight</span> - <span style="color: #000000;">100</span><br />                oBtnClose:<span style="color: #000000;">nTop</span>     := oRect:<span style="color: #000000;">nBottom</span> - <span style="color: #000000;">45</span><br />                oBtnSave:<span style="color: #000000;">nLeft</span>     := oRect:<span style="color: #000000;">nRight</span> - <span style="color: #000000;">300</span><br />                oBtnSave:<span style="color: #000000;">nTop</span>      := oRect:<span style="color: #000000;">nBottom</span> - <span style="color: #000000;">45</span><br />                oBtnReset:<span style="color: #000000;">nLeft</span>    := oRect:<span style="color: #000000;">nLeft</span><span style="color: #000000;">+10</span><br />                oBtnReset:<span style="color: #000000;">nTop</span>     := oRect:<span style="color: #000000;">nBottom</span> - <span style="color: #000000;">45</span><br />                oBtnInsert:<span style="color: #000000;">nLeft</span>   := oRect:<span style="color: #000000;">nLeft</span><span style="color: #000000;">+100</span><br />                oBtnInsert:<span style="color: #000000;">nTop</span>    := oRect:<span style="color: #000000;">nBottom</span> - <span style="color: #000000;">45</span><br /><br />                oBrw:<span style="color: #000000;">nWidth</span>        := oRect:<span style="color: #000000;">nWidth</span> - <span style="color: #000000;">210</span><br />                oPanelTitle:<span style="color: #000000;">nTop</span>   := oRect:<span style="color: #000000;">ntop</span><br />                oPanelTitle:<span style="color: #000000;">nLeft</span>  := oRect:<span style="color: #000000;">nleft</span><span style="color: #000000;">+2</span><br />                oPanelTitle:<span style="color: #000000;">nwidth</span> := oRect:<span style="color: #000000;">nRight</span><br /><br />                           <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />                       ><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span>;<br />               <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span>oPanelTitle:=Paneltitle<span style="color: #000000;">&#40;</span>oDlg<span style="color: #000000;">&#41;</span>,;<br />                        SayTexttitle<span style="color: #000000;">&#40;</span>oPanelTitle,oFont<span style="color: #000000;">&#41;</span> ,;<br />                        Eval<span style="color: #000000;">&#40;</span>oDlg:<span style="color: #000000;">bResized</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont, oBold, oFontGet<br /><br />   XBROWSER aData<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> ResizeArray<span style="color: #000000;">&#40;</span> oBrw, nRows, nCols <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> aData    := oBrw:<span style="color: #000000;">aArrayData</span><br />   <span style="color: #00C800;">local</span> iRows, iCols, n<br /><br />   iCols := Len<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aCols</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> iRows := oBrw:<span style="color: #000000;">nLen</span> <span style="color: #000000;">&#41;</span> != nRows .or. iCols != nCols<br /><br />      ASize<span style="color: #000000;">&#40;</span> aData, nRows <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">if</span> nCols != iCols<br />         AEval<span style="color: #000000;">&#40;</span> aData, <span style="color: #000000;">&#123;</span> |a| ASize<span style="color: #000000;">&#40;</span> a, nCols <span style="color: #000000;">&#41;</span>, ;<br />          <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nCols > iCols, AFill<span style="color: #000000;">&#40;</span> a, <span style="color: #000000;">0</span>, iCols + <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">1</span>, <span style="color: #0000ff;">Min</span><span style="color: #000000;">&#40;</span> iRows, nRows <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">endif</span><br />      <span style="color: #00C800;">for</span> n := iRows + <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> nRows<br />         aData<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>  := Array<span style="color: #000000;">&#40;</span> nCols <span style="color: #000000;">&#41;</span><br />         AFill<span style="color: #000000;">&#40;</span> aData<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">next</span><br />      <span style="color: #B900B9;">//</span><br />      oBrw:<span style="color: #000000;">SetArray</span><span style="color: #000000;">&#40;</span> aData, .f., <span style="color: #000000;">0</span>, .t. <span style="color: #000000;">&#41;</span><br />      WITH OBJECT oBrw<br />         AEval<span style="color: #000000;">&#40;</span> :<span style="color: #000000;">aCols</span>, <span style="color: #000000;">&#123;</span> |o,i| o:<span style="color: #000000;">cHeader</span> := LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> i, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />         :<span style="color: #000000;">nEditTypes</span>    := EDIT_GET<br />         :<span style="color: #000000;">nWidths</span>       := <span style="color: #000000;">30</span><br />         :<span style="color: #000000;">lFastEdit</span>     := .t.<br />      END<br /><br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> SetupBrowseMatrix<span style="color: #000000;">&#40;</span>oBrw<span style="color: #000000;">&#41;</span><br /><br /> WITH OBJECT oBrw<br />      :<span style="color: #000000;">RecSelShowKeyNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />      AEval<span style="color: #000000;">&#40;</span> :<span style="color: #000000;">aCols</span>, <span style="color: #000000;">&#123;</span> |o,i| o:<span style="color: #000000;">cHeader</span> := LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> i, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />         :<span style="color: #000000;">nEditTypes</span>    := EDIT_GET<br />         :<span style="color: #000000;">nWidths</span>       := <span style="color: #000000;">30</span><br /><br />         :<span style="color: #000000;">lHscroll</span>            := .f.<br />         :<span style="color: #000000;">lVscroll</span>            := .t.<br />         :<span style="color: #000000;">l2007</span>               := .f.<br />         :<span style="color: #000000;">l2015</span>               := .f.<br /><br />         :<span style="color: #000000;">lAllowRowSizing</span>     := .f.<br />         :<span style="color: #000000;">lAllowColSwapping</span>   := .f.<br />         :<span style="color: #000000;">lAllowColHiding</span>     := .f.<br /><br /><br /><br />         :<span style="color: #000000;">nRowDividerStyle</span>    := LINESTYLE_LIGHTGRAY<br />         :<span style="color: #000000;">nColDividerStyle</span>    := LINESTYLE_LIGHTGRAY<br />         :<span style="color: #000000;">bRecSelHeader</span>    := <span style="color: #000000;">&#123;</span> || <span style="color: #ff0000;">" "</span> <span style="color: #000000;">&#125;</span><br />         :<span style="color: #000000;">SetStyle</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">2018</span> <span style="color: #000000;">&#41;</span><br /><br />         :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   END<br />  <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">//---------------------------------------------------------------------------------------------------------//</span><br /><br /> <span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> Paneltitle<span style="color: #000000;">&#40;</span>oDlg<span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">local</span> oPanel,oBrush<br />  <span style="color: #00C800;">Local</span> aGrad:= <span style="color: #000000;">&#123;</span> RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">173</span>,<span style="color: #000000;">216</span>,<span style="color: #000000;">230</span><span style="color: #000000;">&#41;</span>,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br />  <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush GRADIENT aGrad<br />     oPanel:=Tpanel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">45</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">88</span>, oDlg:<span style="color: #000000;">nWidth</span><span style="color: #000000;">-20</span>, oDlg<span style="color: #000000;">&#41;</span><br />     oPanel:<span style="color: #000000;">SetBrush</span><span style="color: #000000;">&#40;</span> oBrush <span style="color: #000000;">&#41;</span><br />    <span style="color: #B900B9;">// oPanel:bPainted := { || oPanel:Box( 1,1,oPanel:nHeight-1,oPanel:nWidth-1 ) }</span><br />     <span style="color: #00C800;">return</span> oPanel<br /><span style="color: #B900B9;">//---------------------------------------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span>  SayTexttitle<span style="color: #000000;">&#40;</span>oPanelTitle,oFont<span style="color: #000000;">&#41;</span><br /><br />   @ <span style="color: #000000;">10</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Creation Reduced Matrix"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oPanelTitle <span style="color: #0000ff;">FONT</span> oFont  TRANSPARENT<br /><br />  <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /> </div>[/code:dgzccz1y] [img:dgzccz1y]https&#58;//i&#46;postimg&#46;cc/qRdTC0wt/gd&#46;png[/img:dgzccz1y] (1) on SetupBrowseMatrix(oBrw) function there are these commands :lAllowRowSizing := .f. :lAllowColSwapping := .f. :lAllowColHiding := .f. But I can resize the rows and columns...why ? (2) when I enter a number by moving between the cells with the mouse, the value is not saved if I don't remember to press enter (3) at the beginning the array must be empty and with only one row and three columns (4) if the end user wants to automatically delete all the values in all the rows what should I do? (5) if in memory I have saved a text for example 1,2,3,4,5 5,4,6,7,8 5,3,6,2,1 how could I do to automatically insert it in the array and then in the browse?
edit a cell of a xbrowse
[code=fw:11gx8d0q]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"constant.ch"</span><br /><br /><span style="color: #00C800;">function</span> Matrix<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> oDlg, oBrw, oFont, oBold, oFontGet<br /><span style="color: #00C800;">local</span> nBottom &nbsp; := <span style="color: #000000;">33</span><br /><span style="color: #00C800;">local</span> nRight &nbsp; &nbsp;:= <span style="color: #000000;">80</span><br /><span style="color: #00C800;">local</span> nWidth &nbsp; &nbsp;:= <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> nRight * DLG_CHARPIX_W, <span style="color: #000000;">180</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> nHeight &nbsp; := nBottom * DLG_CHARPIX_H<br /><span style="color: #00C800;">local</span> oPanelTitle<br /><span style="color: #00C800;">local</span> oGrp:=array<span style="color: #000000;">&#40;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">local</span> oBtnClose,oBtnSave,oBtnPrint<br /><span style="color: #00C800;">local</span> oBtnReset,oBtnInsert<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aData &nbsp; &nbsp; := &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#123;</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span> <span style="color: #B900B9;">//{{ 1,2,3 } } &nbsp; //, { 4,5,6 } &nbsp; &nbsp; &nbsp; {}</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nRows &nbsp; &nbsp; := Len<span style="color: #000000;">&#40;</span> aData <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nCols &nbsp; &nbsp; := Len<span style="color: #000000;">&#40;</span> aData<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nNumbers &nbsp;:=<span style="color: #000000;">10</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nGuarantee:= <span style="color: #000000;">1</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nPoints &nbsp; := <span style="color: #000000;">1</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-10</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oBold <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-12</span> &nbsp;BOLD<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFontGet <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-14</span><br /><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> &nbsp;nWidth, nHeight &nbsp;;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL &nbsp;<span style="color: #0000ff;">FONT</span> oFont &nbsp; ; &nbsp;<span style="color: #B900B9;">//RESIZABLE</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TiTle</span> <span style="color: #ff0000;">"Manage Matrix"</span><br /><br /><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">70</span>, <span style="color: #000000;">180</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">395</span>,<span style="color: #000000;">300</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; DATASOURCE aData <span style="color: #0000ff;">AUTOCOLS</span> CELL LINES NOBORDER FASTEDIT<br /><br />&nbsp; &nbsp; &nbsp; SetupBrowseMatrix<span style="color: #000000;">&#40;</span>oBrw<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">RecSelShowKeyNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; &nbsp; @ <span style="color: #000000;">70</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Total quantity of numbers"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFont<br />&nbsp; &nbsp; @ <span style="color: #000000;">160</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Development (nr. for &nbsp;column)"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFont<br />&nbsp; &nbsp; @ <span style="color: #000000;">230</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Combinations"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFont<br />&nbsp; &nbsp; @ <span style="color: #000000;">340</span>,<span style="color: #000000;">7</span> <span style="color: #0000ff;">SAY</span> &nbsp;<span style="color: #ff0000;">"Guarantee"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFont<br />&nbsp; &nbsp; @ <span style="color: #000000;">340</span>,<span style="color: #000000;">130</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"points"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">30</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFont<br />&nbsp; &nbsp; @ <span style="color: #000000;">375</span>,<span style="color: #000000;">7</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"width"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFont<br />&nbsp; &nbsp; @ <span style="color: #000000;">375</span>,<span style="color: #000000;">130</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"numbers"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">35</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFont<br /><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">90</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">GET</span> nNumbers <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SPINNER <span style="color: #0000ff;">MIN</span> <span style="color: #000000;">5</span> <span style="color: #0000ff;">MAX</span> <span style="color: #000000;">90</span> &nbsp;<span style="color: #0000ff;">OF</span> oDlg &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"99"</span> &nbsp; <span style="color: #0000ff;">FONT</span> oFontGet<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">250</span> ,<span style="color: #000000;">10</span> <span style="color: #0000ff;">GET</span> nRows <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg SPINNER <span style="color: #0000ff;">MIN</span> <span style="color: #000000;">1</span> <span style="color: #0000ff;">MAX</span> <span style="color: #000000;">100</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> ResizeArray<span style="color: #000000;">&#40;</span> oBrw, nRows, nCols <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #0000ff;">FONT</span> oFontGet<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">180</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">GET</span> nCols <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg SPINNER <span style="color: #0000ff;">MIN</span> &nbsp;<span style="color: #000000;">3</span> <span style="color: #0000ff;">MAX</span> <span style="color: #000000;">10</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> ResizeArray<span style="color: #000000;">&#40;</span> oBrw, nRows, nCols <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">FONT</span> oFontGet<br /><br />&nbsp; &nbsp; @ <span style="color: #000000;">335</span> ,<span style="color: #000000;">55</span> <span style="color: #0000ff;">GET</span> nGuarantee <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SPINNER <span style="color: #0000ff;">MIN</span> <span style="color: #000000;">1</span> &nbsp;<span style="color: #0000ff;">MAX</span> <span style="color: #000000;">10</span> &nbsp;<span style="color: #0000ff;">OF</span> oDlg &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"99"</span> &nbsp;<span style="color: #0000ff;">FONT</span> oFontGet<br /><br />&nbsp; &nbsp; &nbsp;@ <span style="color: #000000;">370</span> ,<span style="color: #000000;">55</span> <span style="color: #0000ff;">GET</span> nPoints &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SPINNER <span style="color: #0000ff;">MIN</span> <span style="color: #000000;">1</span> &nbsp;<span style="color: #0000ff;">MAX</span> <span style="color: #000000;">10</span> &nbsp;<span style="color: #0000ff;">OF</span> oDlg &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"99"</span> &nbsp;<span style="color: #0000ff;">FONT</span> oFontGet<br /><br /><br /><br />&nbsp; &nbsp; @ <span style="color: #000000;">50</span>,<span style="color: #000000;">175</span> GROUP oGrp<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">To</span> <span style="color: #000000;">410</span>,oDlg:<span style="color: #000000;">nWidth</span><span style="color: #000000;">-20</span> Label <span style="color: #ff0000;">"Matrix"</span> TRANSPARENT <span style="color: #0000ff;">PIXEL</span> &nbsp;<span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp; @ <span style="color: #000000;">50</span>,<span style="color: #000000;">2</span> &nbsp; GROUP oGrp<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">To</span> <span style="color: #000000;">300</span>,<span style="color: #000000;">170</span> Label <span style="color: #ff0000;">"Reduced System"</span> TRANSPARENT <span style="color: #0000ff;">PIXEL</span> &nbsp;<span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp; @ <span style="color: #000000;">310</span>,<span style="color: #000000;">2</span> GROUP oGrp<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">To</span> <span style="color: #000000;">410</span>,<span style="color: #000000;">170</span> Label <span style="color: #ff0000;">"Guarantee"</span> TRANSPARENT <span style="color: #0000ff;">PIXEL</span> &nbsp;<span style="color: #0000ff;">OF</span> oDlg<br /><br /><br /><br /><br />&nbsp; &nbsp; &nbsp;@ <span style="color: #000000;">100</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> oBtnReset <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Reset"</span> <span style="color: #0000ff;">of</span> oDlg &nbsp; &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">22</span> <span style="color: #0000ff;">ACTION</span> SetZeros<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;@ <span style="color: #000000;">100</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> oBtnInsert <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Insert"</span> <span style="color: #0000ff;">of</span> oDlg &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">22</span> <span style="color: #0000ff;">ACTION</span> NewData<span style="color: #000000;">&#40;</span> oBrw, <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;@ <span style="color: #000000;">100</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> oBtnPrint <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Print"</span> <span style="color: #0000ff;">of</span> oDlg &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">22</span> <span style="color: #0000ff;">ACTION</span> oBrw:<span style="color: #000000;">Report</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;@ <span style="color: #000000;">100</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> oBtnClose <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Close"</span> <span style="color: #0000ff;">of</span> oDlg &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">22</span> <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;@ <span style="color: #000000;">100</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> oBtnSave &nbsp;<span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Save"</span> &nbsp;<span style="color: #0000ff;">of</span> oDlg &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">22</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #00C800;">NIL</span><br /><br /><br />&nbsp; oDlg:<span style="color: #000000;">bResized</span> := <||<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">local</span> oRect := oDlg:<span style="color: #000000;">GetCliRect</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBtnPrint:<span style="color: #000000;">nLeft</span> &nbsp; &nbsp;:= oRect:<span style="color: #000000;">nRight</span> - <span style="color: #000000;">200</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBtnPrint:<span style="color: #000000;">nTop</span> &nbsp; &nbsp; := oRect:<span style="color: #000000;">nBottom</span> - <span style="color: #000000;">45</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBtnClose:<span style="color: #000000;">nLeft</span> &nbsp; &nbsp;:= oRect:<span style="color: #000000;">nRight</span> - <span style="color: #000000;">100</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBtnClose:<span style="color: #000000;">nTop</span> &nbsp; &nbsp; := oRect:<span style="color: #000000;">nBottom</span> - <span style="color: #000000;">45</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBtnSave:<span style="color: #000000;">nLeft</span> &nbsp; &nbsp; := oRect:<span style="color: #000000;">nRight</span> - <span style="color: #000000;">300</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBtnSave:<span style="color: #000000;">nTop</span> &nbsp; &nbsp; &nbsp;:= oRect:<span style="color: #000000;">nBottom</span> - <span style="color: #000000;">45</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBtnReset:<span style="color: #000000;">nLeft</span> &nbsp; &nbsp;:= oRect:<span style="color: #000000;">nLeft</span><span style="color: #000000;">+10</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBtnReset:<span style="color: #000000;">nTop</span> &nbsp; &nbsp; := oRect:<span style="color: #000000;">nBottom</span> - <span style="color: #000000;">45</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBtnInsert:<span style="color: #000000;">nLeft</span> &nbsp; := oRect:<span style="color: #000000;">nLeft</span><span style="color: #000000;">+100</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBtnInsert:<span style="color: #000000;">nTop</span> &nbsp; &nbsp;:= oRect:<span style="color: #000000;">nBottom</span> - <span style="color: #000000;">45</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">nWidth</span> &nbsp; &nbsp; &nbsp; &nbsp;:= oRect:<span style="color: #000000;">nWidth</span> - <span style="color: #000000;">210</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oPanelTitle:<span style="color: #000000;">nTop</span> &nbsp; := oRect:<span style="color: #000000;">ntop</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oPanelTitle:<span style="color: #000000;">nLeft</span> &nbsp;:= oRect:<span style="color: #000000;">nleft</span><span style="color: #000000;">+2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oPanelTitle:<span style="color: #000000;">nwidth</span> := oRect:<span style="color: #000000;">nRight</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span>oPanelTitle:=Paneltitle<span style="color: #000000;">&#40;</span>oDlg<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SayTexttitle<span style="color: #000000;">&#40;</span>oPanelTitle,oFont<span style="color: #000000;">&#41;</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Eval<span style="color: #000000;">&#40;</span>oDlg:<span style="color: #000000;">bResized</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont, oBold, oFontGet<br /><br />&nbsp; &nbsp;XBROWSER aData<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> ResizeArray<span style="color: #000000;">&#40;</span> oBrw, nRows, nCols <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aData &nbsp; &nbsp;:= oBrw:<span style="color: #000000;">aArrayData</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> iRows, iCols, n<br /><br />&nbsp; &nbsp;iCols := Len<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aCols</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> iRows := oBrw:<span style="color: #000000;">nLen</span> <span style="color: #000000;">&#41;</span> != nRows .or. iCols != nCols<br /><br />&nbsp; &nbsp; &nbsp; ASize<span style="color: #000000;">&#40;</span> aData, nRows <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> nCols != iCols<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AEval<span style="color: #000000;">&#40;</span> aData, <span style="color: #000000;">&#123;</span> |a| ASize<span style="color: #000000;">&#40;</span> a, nCols <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nCols > iCols, AFill<span style="color: #000000;">&#40;</span> a, <span style="color: #000000;">0</span>, iCols + <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">1</span>, <span style="color: #0000ff;">Min</span><span style="color: #000000;">&#40;</span> iRows, nRows <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">for</span> n := iRows + <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> nRows<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aData<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> &nbsp;:= Array<span style="color: #000000;">&#40;</span> nCols <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AFill<span style="color: #000000;">&#40;</span> aData<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">next</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">//</span><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">SetArray</span><span style="color: #000000;">&#40;</span> aData, .f., <span style="color: #000000;">0</span>, .t. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; SetupBrowseMatrix<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> SetupBrowseMatrix<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br />&nbsp;WITH OBJECT oBrw<br /><span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp;:RecSelShowKeyNo()</span><br /><br />&nbsp; &nbsp; &nbsp; AEval<span style="color: #000000;">&#40;</span> :<span style="color: #000000;">aCols</span>, <span style="color: #000000;">&#123;</span> |o,i| o:<span style="color: #000000;">cHeader</span> := LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> i, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">nEditTypes</span> &nbsp; &nbsp;:= EDIT_GET<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">nWidths</span> &nbsp; &nbsp; &nbsp; := <span style="color: #000000;">30</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">lHscroll</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= .f.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">lVscroll</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= .t.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">l2007</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := .f.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">l2015</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := .f.<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">lAllowRowSizing</span> &nbsp; &nbsp; := .f.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">lAllowColSwapping</span> &nbsp; := .f.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">lAllowColHiding</span> &nbsp; &nbsp; := .f.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// NEW</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">lAllowSizings</span> &nbsp; &nbsp; &nbsp; := .f.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">lAutoSaves</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= .t.<br /><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">nRowDividerStyle</span> &nbsp; &nbsp;:= LINESTYLE_LIGHTGRAY<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">nColDividerStyle</span> &nbsp; &nbsp;:= LINESTYLE_LIGHTGRAY<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">bRecSelHeader</span> &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> || <span style="color: #ff0000;">" "</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">SetStyle</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">2018</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp; &nbsp; :CreateFromCode()</span><br />&nbsp; &nbsp;END<br />&nbsp; <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">//---------------------------------------------------------------------------------------------------------//</span><br /><br />&nbsp;<span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> Paneltitle<span style="color: #000000;">&#40;</span>oDlg<span style="color: #000000;">&#41;</span><br />&nbsp; <span style="color: #00C800;">local</span> oPanel,oBrush<br />&nbsp; <span style="color: #00C800;">Local</span> aGrad:= <span style="color: #000000;">&#123;</span> RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">173</span>,<span style="color: #000000;">216</span>,<span style="color: #000000;">230</span><span style="color: #000000;">&#41;</span>,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br />&nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush GRADIENT aGrad<br />&nbsp; &nbsp; &nbsp;oPanel:=Tpanel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">45</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">88</span>, oDlg:<span style="color: #000000;">nWidth</span><span style="color: #000000;">-20</span>, oDlg<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;oPanel:<span style="color: #000000;">SetBrush</span><span style="color: #000000;">&#40;</span> oBrush <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">// oPanel:bPainted := { || oPanel:Box( 1,1,oPanel:nHeight-1,oPanel:nWidth-1 ) }</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">return</span> oPanel<br /><span style="color: #B900B9;">//---------------------------------------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> &nbsp;SayTexttitle<span style="color: #000000;">&#40;</span>oPanelTitle,oFont<span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">10</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Creation Reduced Matrix"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oPanelTitle <span style="color: #0000ff;">FONT</span> oFont &nbsp;TRANSPARENT<br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> SetZeros<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;AEval<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aArrayData</span>, <span style="color: #000000;">&#123;</span> |aRow| AFill<span style="color: #000000;">&#40;</span> aRow, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> NewData<span style="color: #000000;">&#40;</span> oBrw, cData <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aNewData<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> n<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> &nbsp;cData := ;<br />&nbsp; &nbsp;<span style="color: #ff0000;">"1,2,3,4,5"</span> + CRLF + ;<br />&nbsp; &nbsp;<span style="color: #ff0000;">"5,4,6,7,8"</span> + CRLF + ;<br />&nbsp; &nbsp;<span style="color: #ff0000;">"5,3,6,2,1"</span><br /><br />&nbsp; &nbsp;cData := StrTran<span style="color: #000000;">&#40;</span> cData, CRLF, CHR<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;aNewData := HB_ATokens<span style="color: #000000;">&#40;</span> cData, CHR<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;AEval<span style="color: #000000;">&#40;</span> aNewData, <span style="color: #000000;">&#123;</span> |c,i| aNewData<span style="color: #000000;">&#91;</span> i <span style="color: #000000;">&#93;</span> := HB_ATokens<span style="color: #000000;">&#40;</span> c, <span style="color: #ff0000;">","</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">for</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> aNewData <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; AEval<span style="color: #000000;">&#40;</span> aNewData<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>, <span style="color: #000000;">&#123;</span> |c,i| aNewData<span style="color: #000000;">&#91;</span> n, i <span style="color: #000000;">&#93;</span> := Val<span style="color: #000000;">&#40;</span> c <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">next</span><br /><br />&nbsp; &nbsp;ResizeArray<span style="color: #000000;">&#40;</span> oBrw, Len<span style="color: #000000;">&#40;</span> aNewData <span style="color: #000000;">&#41;</span>, Len<span style="color: #000000;">&#40;</span> aNewData<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">for</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> aNewData <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> := aNewData<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">next</span><br /><br />&nbsp; &nbsp;SetupBrowseMatrix<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br />&nbsp;</div>[/code:11gx8d0q]
edit a cell of a xbrowse
[quote:1djguzzl] But I can resize the rows and columns...why ? [/quote:1djguzzl] oBrw:lAllowRowSizing := .f. // prevent row sizing oCol:lAllowSizing := .f. // prevent col resizing of a particular column oBrw:lAllowSizings := .f. // prent resizing of all columns. [quote:1djguzzl] (2) when I enter a number by moving between the cells with the mouse, the value is not saved if I don't remember to press enter [/quote:1djguzzl] This is the default behaviour and is safe. For what you want, set oCol:lAutoSave := .t. for all columns, set oBrw:lAutoSaves := .t. [quote:1djguzzl] (3) at the beginning the array must be empty and with only one row and three columns [/quote:1djguzzl] Start with local aData := {{0,0,0}} [quote:1djguzzl] (4) if the end user wants to automatically delete all the values in all the rows what should I do? (5) if in memory I have saved a text for example 1,2,3,4,5 5,4,6,7,8 5,3,6,2,1 how could I do to automatically insert it in the array and then in the browse? [/quote:1djguzzl] I posted functions in my latest revision
edit a cell of a xbrowse
[quote="nageswaragunupudi":2r2w5kmf][quote:2r2w5kmf] But I can resize the rows and columns...why ? [/quote:2r2w5kmf] oBrw:lAllowRowSizing := .f. // prevent row sizing oCol:lAllowSizing := .f. // prevent col resizing of a particular column oBrw:lAllowSizings := .f. // prent resizing of all columns. [quote:2r2w5kmf] (2) when I enter a number by moving between the cells with the mouse, the value is not saved if I don't remember to press enter [/quote:2r2w5kmf] This is the default behaviour and is safe. For what you want, set oCol:lAutoSave := .t. for all columns, set oBrw:lAutoSaves := .t. [quote:2r2w5kmf] (3) at the beginning the array must be empty and with only one row and three columns [/quote:2r2w5kmf] Start with local aData := {{0,0,0}} [quote:2r2w5kmf] (4) if the end user wants to automatically delete all the values in all the rows what should I do? (5) if in memory I have saved a text for example 1,2,3,4,5 5,4,6,7,8 5,3,6,2,1 how could I do to automatically insert it in the array and then in the browse? [/quote:2r2w5kmf] I posted functions in my latest revision[/quote:2r2w5kmf]
edit a cell of a xbrowse
[quote="nageswaragunupudi":12pqpzcv][quote:12pqpzcv] But I can resize the rows and columns...why ? [/quote:12pqpzcv] oBrw:lAllowRowSizing := .f. // prevent row sizing oCol:lAllowSizing := .f. // prevent col resizing of a particular column oBrw:lAllowSizings := .f. // prent resizing of all columns. [quote:12pqpzcv] (2) when I enter a number by moving between the cells with the mouse, the value is not saved if I don't remember to press enter [/quote:12pqpzcv] This is the default behaviour and is safe. For what you want, set oCol:lAutoSave := .t. for all columns, set oBrw:lAutoSaves := .t. [quote:12pqpzcv] (3) at the beginning the array must be empty and with only one row and three columns [/quote:12pqpzcv] Start with local aData := {{0,0,0}} [quote:12pqpzcv] (4) if the end user wants to automatically delete all the values in all the rows what should I do? (5) if in memory I have saved a text for example 1,2,3,4,5 5,4,6,7,8 5,3,6,2,1 how could I do to automatically insert it in the array and then in the browse? [/quote:12pqpzcv] I posted functions in my latest revision[/quote:12pqpzcv] I saw all and I saw there are commands I not known.thanks Today I'm studying how save It because I allready a dbf on oldest app with 10fields , now I must decide if use the dbf or save the reduced system on file ascii A questione how can i print (on report method) the adata without zeros? Or put a "--" instead of zeros?
edit a cell of a xbrowse
oBrw:cEditPictures := "@Z 999"
edit a cell of a xbrowse
[quote="nageswaragunupudi":3432pmr0]oBrw:cEditPictures := "@Z 999"[/quote:3432pmr0] Nages, How can I do to insert a line between two lines and recalculate the line number (RecSelShowKeyNo)? How can I delete a line, I have tried with aDel but then it is not good when I import a new schema cData does not refresh the get columns / rows sample on New data function I load a file txt the procedure insert tha data into oBrw but then not refresh the number of row and cols on the get [code=fw:3432pmr0]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"constant.ch"</span><br /><br /><span style="color: #00C800;">function</span> Matrix<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> oDlg, oBrw, oFont, oBold, oFontGet<br /><span style="color: #00C800;">local</span> nBottom &nbsp; := <span style="color: #000000;">33</span><br /><span style="color: #00C800;">local</span> nRight &nbsp; &nbsp;:= <span style="color: #000000;">80</span><br /><span style="color: #00C800;">local</span> nWidth &nbsp; &nbsp;:= <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> nRight * DLG_CHARPIX_W, <span style="color: #000000;">180</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> nHeight &nbsp; := nBottom * DLG_CHARPIX_H<br /><span style="color: #00C800;">local</span> oPanelTitle<br /><span style="color: #00C800;">local</span> oGrp:=array<span style="color: #000000;">&#40;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">local</span> aGet:=array<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">local</span> oBtnClose,oBtnSave,oBtnPrint<br /><span style="color: #00C800;">local</span> oBtnReset,oBtnInsert<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aData &nbsp; &nbsp; := &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#123;</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span> <span style="color: #B900B9;">//{{ 1,2,3 } } &nbsp; //, { 4,5,6 } &nbsp; &nbsp; &nbsp; {}</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nRows &nbsp; &nbsp; := Len<span style="color: #000000;">&#40;</span> aData <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nCols &nbsp; &nbsp; := Len<span style="color: #000000;">&#40;</span> aData<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nNumbers &nbsp;:=<span style="color: #000000;">10</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nGuarantee:= <span style="color: #000000;">1</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nPoints &nbsp; := <span style="color: #000000;">1</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-10</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oBold <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-12</span> &nbsp;BOLD<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFontGet <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-14</span><br /><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> &nbsp;nWidth, nHeight &nbsp;;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL &nbsp;<span style="color: #0000ff;">FONT</span> oFont &nbsp;RESIZABLE ; &nbsp;<span style="color: #B900B9;">//RESIZABLE</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TiTle</span> <span style="color: #ff0000;">"Manage Matrix"</span><br /><br /><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">70</span>, <span style="color: #000000;">180</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">395</span>,<span style="color: #000000;">300</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; DATASOURCE aData <span style="color: #0000ff;">AUTOCOLS</span> CELL LINES NOBORDER FASTEDIT<br /><br />&nbsp; &nbsp; &nbsp; SetupBrowseMatrix<span style="color: #000000;">&#40;</span>oBrw<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">RecSelShowKeyNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; &nbsp; @ <span style="color: #000000;">70</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Total quantity of numbers"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFont<br />&nbsp; &nbsp; @ <span style="color: #000000;">160</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Development (nr. for &nbsp;column)"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFont<br />&nbsp; &nbsp; @ <span style="color: #000000;">230</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Combinations"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFont<br />&nbsp; &nbsp; @ <span style="color: #000000;">340</span>,<span style="color: #000000;">7</span> <span style="color: #0000ff;">SAY</span> &nbsp;<span style="color: #ff0000;">"Guarantee"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFont<br />&nbsp; &nbsp; @ <span style="color: #000000;">340</span>,<span style="color: #000000;">130</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"points"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">30</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFont<br />&nbsp; &nbsp; @ <span style="color: #000000;">375</span>,<span style="color: #000000;">7</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"width"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFont<br />&nbsp; &nbsp; @ <span style="color: #000000;">375</span>,<span style="color: #000000;">130</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"numbers"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">35</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFont<br /><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">90</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">GET</span> aget<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> nNumbers <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SPINNER <span style="color: #0000ff;">MIN</span> <span style="color: #000000;">5</span> <span style="color: #0000ff;">MAX</span> <span style="color: #000000;">90</span> &nbsp;<span style="color: #0000ff;">OF</span> oDlg &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"99"</span> &nbsp; <span style="color: #0000ff;">FONT</span> oFontGet<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">250</span> ,<span style="color: #000000;">10</span> <span style="color: #0000ff;">GET</span> aget<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> nRows <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg SPINNER <span style="color: #0000ff;">MIN</span> <span style="color: #000000;">1</span> <span style="color: #0000ff;">MAX</span> <span style="color: #000000;">100</span> ;<br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"99"</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> ResizeArray<span style="color: #000000;">&#40;</span> oBrw, nRows, nCols, aGet <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #0000ff;">FONT</span> oFontGet <span style="color: #0000ff;">UPDATE</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">180</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">GET</span> aget<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> nCols <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg SPINNER <span style="color: #0000ff;">MIN</span> &nbsp;<span style="color: #000000;">3</span> <span style="color: #0000ff;">MAX</span> <span style="color: #000000;">10</span> ;<br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"99"</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> ResizeArray<span style="color: #000000;">&#40;</span> oBrw, nRows, nCols, aGet <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">FONT</span> oFontGet <span style="color: #0000ff;">UPDATE</span><br /><br />&nbsp; &nbsp; @ <span style="color: #000000;">335</span> ,<span style="color: #000000;">55</span> <span style="color: #0000ff;">GET</span> nGuarantee <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SPINNER <span style="color: #0000ff;">MIN</span> <span style="color: #000000;">1</span> &nbsp;<span style="color: #0000ff;">MAX</span> <span style="color: #000000;">10</span> &nbsp;<span style="color: #0000ff;">OF</span> oDlg &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"99"</span> &nbsp;<span style="color: #0000ff;">FONT</span> oFontGet<br /><br />&nbsp; &nbsp; &nbsp;@ <span style="color: #000000;">370</span> ,<span style="color: #000000;">55</span> <span style="color: #0000ff;">GET</span> nPoints &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SPINNER <span style="color: #0000ff;">MIN</span> <span style="color: #000000;">1</span> &nbsp;<span style="color: #0000ff;">MAX</span> <span style="color: #000000;">10</span> &nbsp;<span style="color: #0000ff;">OF</span> oDlg &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"99"</span> &nbsp;<span style="color: #0000ff;">FONT</span> oFontGet<br /><br /><br /><br />&nbsp; &nbsp; @ <span style="color: #000000;">50</span>,<span style="color: #000000;">175</span> GROUP oGrp<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">To</span> <span style="color: #000000;">410</span>,oDlg:<span style="color: #000000;">nWidth</span><span style="color: #000000;">-20</span> Label <span style="color: #ff0000;">"Matrix"</span> TRANSPARENT <span style="color: #0000ff;">PIXEL</span> &nbsp;<span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp; @ <span style="color: #000000;">50</span>,<span style="color: #000000;">2</span> &nbsp; GROUP oGrp<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">To</span> <span style="color: #000000;">300</span>,<span style="color: #000000;">170</span> Label <span style="color: #ff0000;">"Reduced System"</span> TRANSPARENT <span style="color: #0000ff;">PIXEL</span> &nbsp;<span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp; @ <span style="color: #000000;">310</span>,<span style="color: #000000;">2</span> GROUP oGrp<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">To</span> <span style="color: #000000;">410</span>,<span style="color: #000000;">170</span> Label <span style="color: #ff0000;">"Guarantee"</span> TRANSPARENT <span style="color: #0000ff;">PIXEL</span> &nbsp;<span style="color: #0000ff;">OF</span> oDlg<br /><br /><br /><br /><br />&nbsp; &nbsp; &nbsp;@ <span style="color: #000000;">100</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> oBtnReset <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Reset"</span> <span style="color: #0000ff;">of</span> oDlg &nbsp; &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">22</span> <span style="color: #0000ff;">ACTION</span> SetZeros<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;@ <span style="color: #000000;">100</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> oBtnInsert <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Insert"</span> <span style="color: #0000ff;">of</span> oDlg &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">22</span> <span style="color: #0000ff;">ACTION</span> NewData<span style="color: #000000;">&#40;</span> oBrw, <span style="color: #00C800;">nil</span> , aGet<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;@ <span style="color: #000000;">100</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> oBtnPrint <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Print"</span> <span style="color: #0000ff;">of</span> oDlg &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">22</span> <span style="color: #0000ff;">ACTION</span> oBrw:<span style="color: #000000;">Report</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;@ <span style="color: #000000;">100</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> oBtnClose <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Close"</span> <span style="color: #0000ff;">of</span> oDlg &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">22</span> <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;@ <span style="color: #000000;">100</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> oBtnSave &nbsp;<span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Save"</span> &nbsp;<span style="color: #0000ff;">of</span> oDlg &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">22</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #00C800;">NIL</span><br /><br /><br />&nbsp; oDlg:<span style="color: #000000;">bResized</span> := <||<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">local</span> oRect := oDlg:<span style="color: #000000;">GetCliRect</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBtnPrint:<span style="color: #000000;">nLeft</span> &nbsp; &nbsp;:= oRect:<span style="color: #000000;">nRight</span> - <span style="color: #000000;">200</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBtnPrint:<span style="color: #000000;">nTop</span> &nbsp; &nbsp; := oRect:<span style="color: #000000;">nBottom</span> - <span style="color: #000000;">45</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBtnClose:<span style="color: #000000;">nLeft</span> &nbsp; &nbsp;:= oRect:<span style="color: #000000;">nRight</span> - <span style="color: #000000;">100</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBtnClose:<span style="color: #000000;">nTop</span> &nbsp; &nbsp; := oRect:<span style="color: #000000;">nBottom</span> - <span style="color: #000000;">45</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBtnSave:<span style="color: #000000;">nLeft</span> &nbsp; &nbsp; := oRect:<span style="color: #000000;">nRight</span> - <span style="color: #000000;">300</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBtnSave:<span style="color: #000000;">nTop</span> &nbsp; &nbsp; &nbsp;:= oRect:<span style="color: #000000;">nBottom</span> - <span style="color: #000000;">45</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBtnReset:<span style="color: #000000;">nLeft</span> &nbsp; &nbsp;:= oRect:<span style="color: #000000;">nLeft</span><span style="color: #000000;">+10</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBtnReset:<span style="color: #000000;">nTop</span> &nbsp; &nbsp; := oRect:<span style="color: #000000;">nBottom</span> - <span style="color: #000000;">45</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBtnInsert:<span style="color: #000000;">nLeft</span> &nbsp; := oRect:<span style="color: #000000;">nLeft</span><span style="color: #000000;">+100</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBtnInsert:<span style="color: #000000;">nTop</span> &nbsp; &nbsp;:= oRect:<span style="color: #000000;">nBottom</span> - <span style="color: #000000;">45</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">nWidth</span> &nbsp; &nbsp; &nbsp; &nbsp;:= oRect:<span style="color: #000000;">nWidth</span> - <span style="color: #000000;">210</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oPanelTitle:<span style="color: #000000;">nTop</span> &nbsp; := oRect:<span style="color: #000000;">ntop</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oPanelTitle:<span style="color: #000000;">nLeft</span> &nbsp;:= oRect:<span style="color: #000000;">nleft</span><span style="color: #000000;">+2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oPanelTitle:<span style="color: #000000;">nwidth</span> := oRect:<span style="color: #000000;">nRight</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span>oPanelTitle:=Paneltitle<span style="color: #000000;">&#40;</span>oDlg<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SayTexttitle<span style="color: #000000;">&#40;</span>oPanelTitle,oFont<span style="color: #000000;">&#41;</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Eval<span style="color: #000000;">&#40;</span>oDlg:<span style="color: #000000;">bResized</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont, oBold, oFontGet<br /><br />&nbsp; &nbsp;XBROWSER aData<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> ResizeArray<span style="color: #000000;">&#40;</span> oBrw, nRows, nCols, oControls <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aData &nbsp; &nbsp;:= oBrw:<span style="color: #000000;">aArrayData</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> iRows, iCols, n<br /><br />&nbsp; &nbsp;iCols := Len<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aCols</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> iRows := oBrw:<span style="color: #000000;">nLen</span> <span style="color: #000000;">&#41;</span> != nRows .or. iCols != nCols<br /><br />&nbsp; &nbsp; &nbsp; ASize<span style="color: #000000;">&#40;</span> aData, nRows <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> nCols != iCols<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AEval<span style="color: #000000;">&#40;</span> aData, <span style="color: #000000;">&#123;</span> |a| ASize<span style="color: #000000;">&#40;</span> a, nCols <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nCols > iCols, AFill<span style="color: #000000;">&#40;</span> a, <span style="color: #000000;">0</span>, iCols + <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">1</span>, <span style="color: #0000ff;">Min</span><span style="color: #000000;">&#40;</span> iRows, nRows <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">for</span> n := iRows + <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> nRows<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aData<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> &nbsp;:= Array<span style="color: #000000;">&#40;</span> nCols <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AFill<span style="color: #000000;">&#40;</span> aData<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">next</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">//</span><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">SetArray</span><span style="color: #000000;">&#40;</span> aData, .f., <span style="color: #000000;">0</span>, .t. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; SetupBrowseMatrix<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;oControls<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> Len<span style="color: #000000;">&#40;</span> aData <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oControls<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>Len<span style="color: #000000;">&#40;</span> aData<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oControls<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oControls<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> SetupBrowseMatrix<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br />&nbsp;WITH OBJECT oBrw<br /><span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp;:RecSelShowKeyNo()</span><br /><br />&nbsp; &nbsp; &nbsp; AEval<span style="color: #000000;">&#40;</span> :<span style="color: #000000;">aCols</span>, <span style="color: #000000;">&#123;</span> |o,i| o:<span style="color: #000000;">cHeader</span> := LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> i, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">nEditTypes</span> &nbsp; &nbsp;:= EDIT_GET<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">nWidths</span> &nbsp; &nbsp; &nbsp; := <span style="color: #000000;">30</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">lHscroll</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= .f.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">lVscroll</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= .t.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">l2007</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := .f.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">l2015</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := .f.<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">lAllowRowSizing</span> &nbsp; &nbsp; := .f.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">lAllowColSwapping</span> &nbsp; := .f.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">lAllowColHiding</span> &nbsp; &nbsp; := .f.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// NEW</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">lAllowSizings</span> &nbsp; &nbsp; &nbsp; := .f.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">lAutoSaves</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= .t.<br /><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">nRowDividerStyle</span> &nbsp; &nbsp;:= LINESTYLE_LIGHTGRAY<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">nColDividerStyle</span> &nbsp; &nbsp;:= LINESTYLE_LIGHTGRAY<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">bRecSelHeader</span> &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> || <span style="color: #ff0000;">" "</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">SetStyle</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">2018</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp; &nbsp; :CreateFromCode()</span><br />&nbsp; &nbsp;END<br />&nbsp; &nbsp;<span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><span style="color: #B900B9;">//---------------------------------------------------------------------------------------------------------//</span><br /><br />&nbsp;<span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> Paneltitle<span style="color: #000000;">&#40;</span>oDlg<span style="color: #000000;">&#41;</span><br />&nbsp; <span style="color: #00C800;">local</span> oPanel,oBrush<br />&nbsp; <span style="color: #00C800;">Local</span> aGrad:= <span style="color: #000000;">&#123;</span> RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">173</span>,<span style="color: #000000;">216</span>,<span style="color: #000000;">230</span><span style="color: #000000;">&#41;</span>,RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">255</span>,<span style="color: #000000;">255</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br />&nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush GRADIENT aGrad<br />&nbsp; &nbsp; &nbsp;oPanel:=Tpanel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">45</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">88</span>, oDlg:<span style="color: #000000;">nWidth</span><span style="color: #000000;">-20</span>, oDlg<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp;oPanel:<span style="color: #000000;">SetBrush</span><span style="color: #000000;">&#40;</span> oBrush <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #B900B9;">// oPanel:bPainted := { || oPanel:Box( 1,1,oPanel:nHeight-1,oPanel:nWidth-1 ) }</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #00C800;">return</span> oPanel<br /><span style="color: #B900B9;">//---------------------------------------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> &nbsp;SayTexttitle<span style="color: #000000;">&#40;</span>oPanelTitle,oFont<span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">10</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Creation Reduced Matrix"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oPanelTitle <span style="color: #0000ff;">FONT</span> oFont &nbsp;TRANSPARENT<br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> SetZeros<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;AEval<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aArrayData</span>, <span style="color: #000000;">&#123;</span> |aRow| AFill<span style="color: #000000;">&#40;</span> aRow, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> NewData<span style="color: #000000;">&#40;</span> oBrw, cData, oControls <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aNewData,cFile<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> n<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> &nbsp;cData := ;<br />&nbsp; &nbsp;<span style="color: #ff0000;">"1,2,3,4,5"</span> + CRLF + ;<br />&nbsp; &nbsp;<span style="color: #ff0000;">"5,4,6,7,8"</span> + CRLF + ;<br />&nbsp; &nbsp;<span style="color: #ff0000;">"5,3,6,2,1"</span><br /><br />&nbsp; &nbsp; cFile &nbsp;:= &nbsp;cGetFile<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"TEXT (*.txt)| *.Txt|"</span> + &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"All Files (*.*)| *.*"</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ,<span style="color: #ff0000;">"Please select a text file"</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; cData &nbsp;:= HB_MEMOREAD<span style="color: #000000;">&#40;</span> cFile <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;cData := StrTran<span style="color: #000000;">&#40;</span> cData, CRLF, CHR<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;aNewData := HB_ATokens<span style="color: #000000;">&#40;</span> cData, CHR<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;AEval<span style="color: #000000;">&#40;</span> aNewData, <span style="color: #000000;">&#123;</span> |c,i| aNewData<span style="color: #000000;">&#91;</span> i <span style="color: #000000;">&#93;</span> := HB_ATokens<span style="color: #000000;">&#40;</span> c, <span style="color: #ff0000;">","</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">for</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> aNewData <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; AEval<span style="color: #000000;">&#40;</span> aNewData<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>, <span style="color: #000000;">&#123;</span> |c,i| aNewData<span style="color: #000000;">&#91;</span> n, i <span style="color: #000000;">&#93;</span> := Val<span style="color: #000000;">&#40;</span> c <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">next</span><br /><br />&nbsp; &nbsp;ResizeArray<span style="color: #000000;">&#40;</span> oBrw, Len<span style="color: #000000;">&#40;</span> aNewData <span style="color: #000000;">&#41;</span>, Len<span style="color: #000000;">&#40;</span> aNewData<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>,oControls <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">for</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> aNewData <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> := aNewData<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">next</span><br /><br />&nbsp; &nbsp;SetupBrowseMatrix<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br />----------------------------------------------------------------------------/<br /> </div>[/code:3432pmr0]
edit a record with tdatabase - I am in trouble
I state I can not use an xbrowse to get the record so I have to search the archive first before to make the modify I select an obtn where I save a cargo with many info local cNumPre :=oBtn:cargo[28] [b:t05vag6y]//open the database and order on Invoice number[/b:t05vag6y] oReserva:=Tdatabase():Open(,::cDbfPath + "Reserva" ,"DBFCDX", .t.) oReserva:setOrder("res_pre" ) // field invoice ( string 16 cr) nInvoice:= ALLTRIM(cNumPre) I havethis infor from oBtn:cargo If oReserva:seek(nInvoice) //search [b:t05vag6y]//here i must create the record [/b:t05vag6y] oPrenota:= :=oReserva:record() [b:t05vag6y] // it is sure I stay on the same record of the invoice ?[/b:t05vag6y] else Msginfo("invoice not found") return nil Endif I tried and allway return error not found
edit a record with tdatabase - I am in trouble
Sorry I not had the index on "res_pre" [b:2urgm5p9]discovered the mystery[/b:2urgm5p9] [b:2urgm5p9]a question [/b:2urgm5p9] when i define the opening of the database i have [code=fw:2urgm5p9]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">CLASS</span> TReserva <span style="color: #0000ff;">from</span> TXData<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> lShared <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TReserva<br />&nbsp; &nbsp;<span style="color: #00C800;">Default</span> lShared := .t.<br />&nbsp; &nbsp;::<span style="color: #00C800;">super</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span>,::<span style="color: #000000;">cDbfPath</span> + <span style="color: #ff0000;">"Reserva"</span> ,<span style="color: #ff0000;">"DBFCDX"</span>, lShared<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">use</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">setOrder</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">gotop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">Self</span></div>[/code:2urgm5p9] could i create another method for order search? example METHOD SearchInvoice(nInvoice,oPre,oRes) CLASS TReserva local oRes,lReturn:=.f. oRes:setOrder(res_pre) If oRes:seek(Invoice) oPre:=:=oRes:record() lreturn :=.t. else msginfo("error") endif return lreturn :=.t. and from the program I could automatically recall the record through the method created? oRes:=Treserva():New() If oReserva:searchInvoice(nInvoice,oPre,oRes) .... any suggestions please
edit a record with tdatabase - I am in trouble
[code=fw:32tyd36l]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br />REQUEST DBFCDX<br /><br /><span style="color: #00C800;">static</span> cSeek<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oStates, lFound := .f.<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cExePath &nbsp; &nbsp;:= cFilePath<span style="color: #000000;">&#40;</span> ExeName<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cSeek &nbsp; &nbsp; &nbsp; := <span style="color: #ff0000;">"NY"</span><br /><br />&nbsp; &nbsp;SetGetColorFocus<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oStates &nbsp;:= TDataBase<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">nil</span>, cExePath + <span style="color: #ff0000;">"STATES"</span>, <span style="color: #ff0000;">"DBFCDX"</span>, .t. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> oStates:<span style="color: #000000;">Used</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// USED(). NOT USE()</span><br /><br />&nbsp; &nbsp; &nbsp; oStates:<span style="color: #000000;">bEdit</span> := <span style="color: #000000;">&#123;</span> |oRec| EditStates<span style="color: #000000;">&#40;</span> oRec, cSeek <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> MsgGet<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Enter"</span>, <span style="color: #ff0000;">"STATE CODE"</span>, @cSeek <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cSeek &nbsp; &nbsp;:= UPPER<span style="color: #000000;">&#40;</span> PADR<span style="color: #000000;">&#40;</span> cSeek, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lFound &nbsp; := .f.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oStates:<span style="color: #000000;">LookUp</span><span style="color: #000000;">&#40;</span> cSeek, <span style="color: #ff0000;">"CODE"</span>, <span style="color: #000000;">&#123;</span> |oDbf| lFound := .t., oDbf:<span style="color: #000000;">Load</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oDbf:<span style="color: #00C800;">Edit</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oStates:<span style="color: #000000;">Load</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> !lFound<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oStates:<span style="color: #00C800;">Edit</span><span style="color: #000000;">&#40;</span> .t. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">enddo</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; ? <span style="color: #ff0000;">"STATES.DBF not opened"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> EditStates<span style="color: #000000;">&#40;</span> oRec, cCode <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDbf &nbsp; &nbsp; := oRec:<span style="color: #000000;">uSource</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oBrw &nbsp; &nbsp; := oRec:<span style="color: #000000;">oBrw</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> lNew &nbsp; &nbsp; := <span style="color: #000000;">&#40;</span> oRec:<span style="color: #000000;">RecNo</span> == <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> lEdited &nbsp;:= .f.<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oFont<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> lNew<br />&nbsp; &nbsp; &nbsp; oRec:<span style="color: #000000;">Code</span> &nbsp; := cCode<br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-14</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">350</span>,<span style="color: #000000;">170</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL <span style="color: #0000ff;">FONT</span> oFont ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TITLE</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lNew, <span style="color: #ff0000;">"ADD NEW STATE"</span>, <span style="color: #ff0000;">"EDIT STATE"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ &nbsp;<span style="color: #000000;">30</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"State Code"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp;@ &nbsp;<span style="color: #000000;">60</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"State Name"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br />&nbsp; &nbsp;@ &nbsp;<span style="color: #000000;">30</span>,<span style="color: #000000;">120</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Code</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@!"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">VALID</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">" "</span> $ oRec:<span style="color: #000000;">Code</span>, <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Empty"</span> <span style="color: #000000;">&#41;</span>, .f. <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oDbf:<span style="color: #000000;">LookUp</span><span style="color: #000000;">&#40;</span> oRec:<span style="color: #000000;">Code</span>, <span style="color: #ff0000;">"CODE"</span>, <span style="color: #000000;">&#123;</span> || RECNO<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> != oRec:<span style="color: #000000;">RecNo</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> == .t., ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"DUPLICATE"</span> <span style="color: #000000;">&#41;</span>, .f. <span style="color: #000000;">&#41;</span>, .t. <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ &nbsp;<span style="color: #000000;">60</span>,<span style="color: #000000;">120</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #0000ff;">Name</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #00C800;">CASE</span> PROPER ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">VALID</span> LEN<span style="color: #000000;">&#40;</span> TRIM<span style="color: #000000;">&#40;</span> oRec:<span style="color: #0000ff;">Name</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">5</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">120</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Save"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">WHEN</span> oRec:<span style="color: #000000;">Modified</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> lEdited := oRec:<span style="color: #000000;">Save</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">120</span>,<span style="color: #000000;">230</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Cancel"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">bPainted</span> := <span style="color: #000000;">&#123;</span> || oDlg:<span style="color: #000000;">Box</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">340</span>, <span style="color: #000000;">&#123;</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lNew, CLR_HRED, CLR_HBLUE <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br /><span style="color: #00C800;">return</span> lEdited<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br />&nbsp;</div>[/code:32tyd36l]
edit a record with tdatabase - I am in trouble
[code=fw:dxjrtfh7]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br />REQUEST DBFCDX<br /><br /><span style="color: #00C800;">static</span> cSeek<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oStates, lFound := .f.<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cExePath &nbsp; &nbsp;:= cFilePath<span style="color: #000000;">&#40;</span> ExeName<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cSeek &nbsp; &nbsp; &nbsp; := <span style="color: #ff0000;">"NY"</span><br /><br />&nbsp; &nbsp;SetGetColorFocus<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oStates &nbsp;:= TDataBase<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">nil</span>, cExePath + <span style="color: #ff0000;">"STATES"</span>, <span style="color: #ff0000;">"DBFCDX"</span>, .t. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> oStates:<span style="color: #000000;">Used</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// USED(). NOT USE()</span><br /><br />&nbsp; &nbsp; &nbsp; oStates:<span style="color: #000000;">bEdit</span> := <span style="color: #000000;">&#123;</span> |oRec| EditStates<span style="color: #000000;">&#40;</span> oRec, cSeek <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> MsgGet<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Enter"</span>, <span style="color: #ff0000;">"STATE CODE"</span>, @cSeek <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cSeek &nbsp; &nbsp;:= UPPER<span style="color: #000000;">&#40;</span> PADR<span style="color: #000000;">&#40;</span> cSeek, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lFound &nbsp; := .f.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oStates:<span style="color: #000000;">LookUp</span><span style="color: #000000;">&#40;</span> cSeek, <span style="color: #ff0000;">"CODE"</span>, <span style="color: #000000;">&#123;</span> |oDbf| lFound := .t., oDbf:<span style="color: #000000;">Load</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oDbf:<span style="color: #00C800;">Edit</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oStates:<span style="color: #000000;">Load</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> !lFound<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oStates:<span style="color: #00C800;">Edit</span><span style="color: #000000;">&#40;</span> .t. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">enddo</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; ? <span style="color: #ff0000;">"STATES.DBF not opened"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> EditStates<span style="color: #000000;">&#40;</span> oRec, cCode <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDbf &nbsp; &nbsp; := oRec:<span style="color: #000000;">uSource</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oBrw &nbsp; &nbsp; := oRec:<span style="color: #000000;">oBrw</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> lNew &nbsp; &nbsp; := <span style="color: #000000;">&#40;</span> oRec:<span style="color: #000000;">RecNo</span> == <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> lEdited &nbsp;:= .f.<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oFont<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> lNew<br />&nbsp; &nbsp; &nbsp; oRec:<span style="color: #000000;">Code</span> &nbsp; := cCode<br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-14</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">350</span>,<span style="color: #000000;">170</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL <span style="color: #0000ff;">FONT</span> oFont ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TITLE</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lNew, <span style="color: #ff0000;">"ADD NEW STATE"</span>, <span style="color: #ff0000;">"EDIT STATE"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ &nbsp;<span style="color: #000000;">30</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"State Code"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp;@ &nbsp;<span style="color: #000000;">60</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"State Name"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br />&nbsp; &nbsp;@ &nbsp;<span style="color: #000000;">30</span>,<span style="color: #000000;">120</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #000000;">Code</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@!"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">VALID</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">" "</span> $ oRec:<span style="color: #000000;">Code</span>, <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Empty"</span> <span style="color: #000000;">&#41;</span>, .f. <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oDbf:<span style="color: #000000;">LookUp</span><span style="color: #000000;">&#40;</span> oRec:<span style="color: #000000;">Code</span>, <span style="color: #ff0000;">"CODE"</span>, <span style="color: #000000;">&#123;</span> || RECNO<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> != oRec:<span style="color: #000000;">RecNo</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> == .t., ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"DUPLICATE"</span> <span style="color: #000000;">&#41;</span>, .f. <span style="color: #000000;">&#41;</span>, .t. <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ &nbsp;<span style="color: #000000;">60</span>,<span style="color: #000000;">120</span> <span style="color: #0000ff;">GET</span> oRec:<span style="color: #0000ff;">Name</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #00C800;">CASE</span> PROPER ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">VALID</span> LEN<span style="color: #000000;">&#40;</span> TRIM<span style="color: #000000;">&#40;</span> oRec:<span style="color: #0000ff;">Name</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">5</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">120</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Save"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">WHEN</span> oRec:<span style="color: #000000;">Modified</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> lEdited := oRec:<span style="color: #000000;">Save</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">120</span>,<span style="color: #000000;">230</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Cancel"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">bPainted</span> := <span style="color: #000000;">&#123;</span> || oDlg:<span style="color: #000000;">Box</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">340</span>, <span style="color: #000000;">&#123;</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lNew, CLR_HRED, CLR_HBLUE <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br /><span style="color: #00C800;">return</span> lEdited<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br />&nbsp;</div>[/code:dxjrtfh7]
edit a record with tdatabase - I am in trouble
Mr. Rao: BTW, is there a class as TDataBase, but for MySQL? Regards
edit a record with tdatabase - I am in trouble
Yes. FWH has a built-in library for MySQL. Can connect to MySql, open tables, and use them just like TDatabase. Full documentation: <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=33286">viewtopic.php?f=3&t=33286</a><!-- l --> If you are already using ADO for MySQL, you can use TRecSet class, which works similarly to TDatabase.
edit a record with tdatabase - I am in trouble
Mr. Rao: Thank you, I Will try it. Regards
edit a record with tdatabase - I am in trouble
[quote="nageswaragunupudi":14h89ztq] [/quote:14h89ztq] thanks for the sample test but I must search a string on field Invoice this string is 13 Cr before i couldn't find the data because i didn't order for the index i needed now it's ok [b:14h89ztq]now I'm here asking you something else[/b:14h89ztq] once I have found the record in the Reserva.dbf file I have to load all the data I need for the reservation, in particular I should also search for invoice in the oRigheInvoice archive which would be the lines of the invoice body, and I have them different fields and for now I have done in the traditional method that is with do while / adddd () / endo so I have to populate an array to put in the xbrowse as you can seeon this picture [img:14h89ztq]https&#58;//i&#46;postimg&#46;cc/4dgXVBkW/corpo&#46;png[/img:14h89ztq] in this array I have exactly 18 fields my problem now is to save i.e. for the reserva.dbf archive i.e. for the fields of the invoice header I have no problem, instead I am afraid for the aData array that must be saved in the oRigheInvoice archive, which for the first entry there is no problem for the modification I do not know how to do Since I cannot pack I had thought of deleting the records that had invoice = nInvoice and then inserting the new records but in doing so the archive becomes very large until the maintenance operation by the administrator who can operate with archives in exclusive mode and will be able to pack the archive. Or I have to come up with some other system that is what I saw on yunus.prg but I have not been able to implement it in yunus' editinvoice function I saw that to load the records you do this aItems := IIT->( FW_DbfToArray( cItemFlds, { || IIT->INVNUM == oRec:InvNum } ) ) I changed this line static cItemFlds := "INVNUM,SERIAL,ITEMCODE,ITEMNAME,QUANTITY,UNIT,PRICE,DISCOUNT,RECNO()" into static cItemFlds := "ICO,TIPO,DESC,QTA,PREUNI,TOTQTA,DATAINI,DATAFIN,GIORNI,SCONTO,TOTALE,INVOICE,PRINTA4,PRINTPOS,STRUCTURE,BREVEDESC,PREZZOBASE,SERIAL,RECNO()" how do i translate it into tdatabase? I tried with aData := oRigheInvoice:DbfToArray( cItemFlds, { || oRigheInvoice:Invoice == oRecPrenota:Invoice } ) but it not load any records aData := oRigheInvoice:DbfToArray( cItemFlds, { || alltrim(oRigheInvoice:Invoice) == nInvoice } ) load all records from oRigheInvoice then before save the array there is a part on source I not understood from this WITH OBJECT oBrw --- END then I made the same from if lSave /endif but here make me error
edit a record with tdatabase - I am in trouble
Nages, Now I found the solution I can load to [b:2p2cizo9]adata[/b:2p2cizo9] the records with [code=fw:2p2cizo9]<div class="fw" id="{CB}" style="font-family: monospace;"> aData := oRigheInvoice:<span style="color: #000000;">DbfToArray</span><span style="color: #000000;">&#40;</span> cItemFlds, <span style="color: #000000;">&#123;</span> || FIELD->Invoice ==alltrim<span style="color: #000000;">&#40;</span>nInvoice<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span></div>[/code:2p2cizo9] [img:2p2cizo9]https&#58;//i&#46;postimg&#46;cc/63Zz0bK3/hgf&#46;png[/img:2p2cizo9] if I delete a rows on xbrowse then the procedure not delete the record on save [code=fw:2p2cizo9]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">static</span> cItemFlds := <span style="color: #ff0000;">"ICO,TIPO,DESC,QTA,PREUNI,TOTQTA,DATAINI,DATAFIN,GIORNI,SCONTO,TOTALE,INVOICE,PRINTA4,PRINTPOS,STRUCTURE,BREVEDESC,PREZZOBASE,SERIAL,RECNO()"</span><br /><br /><br /><br /><br />            <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> oBrowse:<span style="color: #000000;">aDeleted</span> <span style="color: #000000;">&#41;</span><br />                   AEval<span style="color: #000000;">&#40;</span> oBrowse:<span style="color: #000000;">aDeleted</span>, <span style="color: #000000;">&#123;</span> |a| a<span style="color: #000000;">&#91;</span> <span style="color: #000000;">19</span> <span style="color: #000000;">&#93;</span> := -a<span style="color: #000000;">&#91;</span><span style="color: #000000;">19</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />                   oRigheInvoice:<span style="color: #000000;">ArrayToDBF</span><span style="color: #000000;">&#40;</span> cItemFlds, oBrowse:<span style="color: #000000;">aDeleted</span> <span style="color: #000000;">&#41;</span><br />                <span style="color: #00C800;">endif</span><br /><br /> </div>[/code:2p2cizo9] I checked it , if I delete a row of browse I see on obrowse:adeleted the record NOt save the SERIAL number and not save the invoice number [code=fw:2p2cizo9]<div class="fw" id="{CB}" style="font-family: monospace;">                AEval<span style="color: #000000;">&#40;</span> aData, <span style="color: #000000;">&#123;</span> |a| a<span style="color: #000000;">&#91;</span> <span style="color: #000000;">12</span> <span style="color: #000000;">&#93;</span> := oRecPrenota:<span style="color: #000000;">Invoice</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">// invoice number </span><br />                AEval<span style="color: #000000;">&#40;</span> aData, <span style="color: #000000;">&#123;</span> |a,i| a<span style="color: #000000;">&#91;</span> <span style="color: #000000;">18</span> <span style="color: #000000;">&#93;</span> := i <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>       <span style="color: #B900B9;">// serial not run</span></div>[/code:2p2cizo9] if I take the same record, if I had deleted a line, I should have the invoice without that line and instead nothing has changed, having the same lines of the invoice I had before How do I resolve?
edit browse
I have a browse that i want to edit numbers in a column. I would like to start the edit process by using any number key or the enter key then have the the edit move down to the next line item. I tried the number key as follows:oBrw:bKeyChar := {| nKey, nRow,nCol | if(nKey= 55, editCell(oBrw,nRow,nCol),"") }Then I get an error message: Path and name: F:\FWH\cashflow\gl2.exe (32 bits) Size: 1,361,408 bytes Time from start: 0 hours 0 mins 7 secs Error occurred at: 07/19/08, 16:30:22 Error description: Error BASE/1004 Message not found: TXBROWSE:NATCOL Args: [ 1] = O ObjectStack Calls=========== Called from: => __ERRRT_SBASE(0) Called from: => TXBROWSE:ERROR(170) Called from: source\rtl\tobject.prg => (b)HBOBJECT(105) Called from: => TXBROWSE:MSGNOTFOUND(0) Called from: => TXBROWSE:NATCOL(164) Called from: .\source\function\EDITCELL.PRG => EDITCELL(0) Called from: gl2.prg => (b)COMPAREPL(647) Called from: => TXBROWSE:KEYCHAR(0) Called from: => TWINDOW:HANDLEEVENT(0) Called from: => TXBROWSE:HANDLEEVENT(0) Called from: .\source\classes\WINDOW.PRG => _FWH(0) Called from: => DIALOGBOX(0) Called from: => TDIALOG:ACTIVATE(0) Called from: gl2.prg => COMPAREPL(745) Called from: gl2.prg => CALLIT(89)The enter key works fine however it doesn't move to the next line. Can someone tell me how to do this.
edit browse
You are using TXBrowse. You are using oBrw:nAtCol in your function EditCell, but there is no data / method with the name nAtCol in TXBrowse. You need to correct your function editCell
edit browse
thanks you for the response.You wrote:You are using TXBrowse. You are using oBrw:nAtCol in your function EditCell, but there is no data / method with the name nAtCol in TXBrowse. You need to correct your function editCellEditcell is not my function it comes from:Called from: .\source\function\EDITCELL.PRG => EDITCELL(0) Correct the function to what?
edit browse
Editcell function is not for xbrowse.Actually if you are using xbrowse, you do not have to write any code for editing. Its very simple. Please compile and try the following code. This example browses and edits the TOTAL column of SALES.DBF in the fwh samples folder. Just as you wanted, if the user is on TOTAL column, any key will invoke edit and after the edit the cursor goes down the next row,[code:1dgqdwqp] #include 'fivewin&#46;ch' #include 'xbrowse&#46;ch' function Main&#40;&#41; local oDlg, oBrw, oCol, b USE \FWH\SAMPLES\SALES NEW SHARED DEFINE DIALOG oDlg SIZE 540,440 PIXEL @ 10,10 XBROWSE oBrw ; SIZE 250,200 PIXEL ; OF oDlg ; ALIAS 'SALES' ; AUTOCOLS ; FASTEDIT ; LINES CELL WITH OBJECT oBrw&#58;oCol&#40; 'Total' &#41; b &#58;= &#58;bOnPostEdit &#58;nEditType &#58;= EDIT_GET &#58;bOnPostEdit &#58;= &#123; |o,x,n| Eval&#40; b,o,x,n &#41;, o&#58;oBrw&#58;GoDown&#40;&#41; &#125; END oBrw&#58;CreateFromCode&#40;&#41; ACTIVATE DIALOG oDlg CENTERED return nil [/code:1dgqdwqp]After you compile and run the above code independantly, you can adopt the same method in your code.
edit browse
The fastedit works great. I added the following code to my browse. (i'm using a resource for the browse):after redefining the xbrowseCode:WITH OBJECT oBrw:oCol( 'act1' ) b := :bOnPostEdit :nEditType := EDIT_GET :bOnPostEdit := { |o,x,n| Eval( b,o,x,n ), o:oBrw:GoDown() } END I get the following error message "No exported method: BONPOSTEDIT"Almost there. Any suggestions will be great.
edit browse
Please post the command you are using to create xbrowse, i.e., REDEFINE XBROWSE command fully.
edit browse
Here it is REDEFINE xBROWSE oBrw ID 101 OF oDlg1 cell lines fastedit autocols //COLOR CLR_RED,CLR_HGRAY WITH OBJECT oBrw:oCol( gl->act1 ) b := :bOnPostEdit :nEditType := EDIT_GET :OnPostEdit := { |o,x,n| Eval( o,x,n ), o:oBrw:GoDown() } END
edit browse
Please change WITH OBJECT oBrw:oCol( gl->act1 )as WITH OBJECT oBrw:oCol( "act1" )Syntax:oBrw:oCol( <cHeader> ) --> Column object having the header <cheader> ( case insensitive ).AlsoREDEFINE xBROWSE oBrw ID 101 OF oDlg1 cell lines fastedit autocols ;ALIAS "<youraliasname>"ALIAS clause is a must.
edit browse
Changed as follows:WITH OBJECT oBrw:oCol("Actual")the error still occurs not when I'm editing but when I go into the browse. The browse never appears.
edit browse
Can you please post your code ? Entire function till activating the dialog
edit browse
I sent the entire prg: A lot of code. Been working well in 16 bit but need to move it for a more up to date appearance.Take a look at the program at <!-- w --><a class="postlink" href="http://www.cashplan.com">www.cashplan.com</a><!-- w -->. Download a copy and give it a ride. there are 2 editable fields in the browse..."Title" and "Actual"Thanks so much for all of your efforts. Its very late here in Los Angeles and I need to get some sleep. Post any help you can provide and I'll check it out in the AM.Thanks again.[code]// GL2.PRG COMPARATIVE PROFIT AND LOSS// 950718#include "fivewin.ch"#include "xbrowse.ch"#include "report.ch"#DEFINE LOGPIXELX 88/* virtual memorychanged GrabSales&#40;&#41;*/memvar nfpmemvar ecflag,ecnum,ecalphamemvar oWnd1memvar invreturnmemvar myear,mcompnamememvar goforwardmemvar ofont7field account,title,ty13static cMovit static oBrw, month&#91;12&#93;static n2040 &#58;= 0static n2500 &#58;= 0static n3353 &#58;= 0static lNeedreset &#58;= .t. static lamount &#58;= .F. // use by percent columnsstatic nsPlanMonthstatic nsActMonth static nsPlanYTDstatic nsActYTDstatic bAct,fbact,act1static bTy,fbty,cty,cactstatic cMonth, nMonthstatic nFilterType &#58;= 0static bDiff,fbdiffstatic mbs &#58;= 0static lVar &#58;= .f.static cAliasmemvar gld, glnfunction callit&#40;&#41; /* commented out invreturn index files carry,carry1 expcf */ public nfp &#58;= .f. public gld &#58;= "gl.d47" public gln &#58;= "gl.n47" public oWnd1 public hWnd DEFINE WINDOW OWND1 FROM 1, 5 TO 20, 80 set resources to "global.dll" use &#40;gld&#41; alias gl new index on account to &#40;gln&#41; index on cr8Spec&#40;&#41; to jake //decendng pl * index on cr8Specialntx&#40;&#41; to carry //alpha * index on cr8Spec2&#40;&#41; to carry1 //decending cf set index to &#40;gln&#41;,jake //,carry,carry1 gl->&#40;dbsetorder&#40;1&#41;&#41; use cfglob.d47 alias cfglob new comparepl&#40;&#41; return nil function comparepl&#40;&#41; local bSeek &#58;= &#123;|| gl->&#40;dbseek&#40;'1000'&#41;&#41; &#125; local nOldArea &#58;= select&#40;&#41; local oBrow1, b, oCol local oCombined &#58;= &#123;&#125; local oDbf local bWhile local lNocost &#58;= .F. local getlist &#58;= &#123;&#125; local oDlg, oGet, oDlg1 local mhelp &#58;= 1 // &#58;= 205 local aRect&#91;4&#93; local oBtn1 local oBtn2 local oBtn3,oBtn4 local oSay1 local oSay2,oSay3 local xMonth local small_font //&#58;= 0 local hDc local aMonth &#58;= &#123;&#125; local oCbx local setOrder &#58;= gl->&#40;dbsetorder&#40;&#41;&#41; local oldFilter &#58;= gl->&#40;dbsetfilter&#40;&#41;&#41; local nIndex &#58;= 0 local oBmp1 local nValid &#58;= 1 cMovit &#58;= SPACE&#40;4&#41; small_font &#58;= getdevicecaps&#40;getdc&#40;hDc&#41;,88&#41; //== 96 releasedc&#40;hDc&#41; select gl // FIX SALES IF TRANSFERRED NEGATIVE gl->&#40;dbseek&#40;"1000"&#41;&#41; if gl->act1 < 0 gl->act1 &#58;= gl->act1*-1 endif if gl->act2 < 0 gl->act2 &#58;= gl->act2*-1 endif if gl->act3 < 0 gl->act3 &#58;= gl->act3*-1 endif if gl->act4 < 0 gl->act4 &#58;= gl->act4*-1 endif if gl->act5 < 0 gl->act5 &#58;= gl->act5*-1 endif if gl->act6 < 0 gl->act6 &#58;= gl->act6*-1 endif if gl->act7 < 0 gl->act7 &#58;= gl->act7*-1 endif if gl->act8 < 0 gl->act8 &#58;= gl->act8*-1 endif if gl->act9 < 0 gl->act9 &#58;= gl->act9*-1 endif if gl->act10 < 0 gl->act10 &#58;= gl->act10*-1 endif if gl->act11 < 0 gl->act11 &#58;= gl->act11*-1 endif if gl->act12 < 0 gl->act12 &#58;= gl->act12*-1 endif //stopkeybs&#40;&#41; mbs &#58;= 0 goforward &#58;= .t. gl->&#40;dbseek&#40;"2019"&#41;&#41; mbs &#58;= ty13 +mbs gl->&#40;dbseek&#40;"2021"&#41;&#41; mbs &#58;= ty13 +mbs gl->&#40;dbseek&#40;"2030"&#41;&#41; mbs &#58;= ty13 +mbs gl->&#40;dbgotop&#40;&#41;&#41; if goforward == .f. gl->&#40;dbsetorder&#40;1&#41;&#41; gl->&#40;dbgotop&#40;&#41;&#41; return nil endif nMonth &#58;= 1 cMonth &#58;= 0 month&#91;1&#93; &#58;= cfglob->mo1 month&#91;2&#93; &#58;= cfglob->mo2 month&#91;3&#93; &#58;= cfglob->mo3 month&#91;4&#93; &#58;= cfglob->mo4 month&#91;5&#93; &#58;= cfglob->mo5 month&#91;6&#93; &#58;= cfglob->mo6 month&#91;7&#93; &#58;= cfglob->mo7 month&#91;8&#93; &#58;= cfglob->mo8 month&#91;9&#93; &#58;= cfglob->mo9 month&#91;10&#93; &#58;= cfglob->mo10 month&#91;11&#93; &#58;= cfglob->mo11 month&#91;12&#93; &#58;= cfglob->mo12 select gl set filter to go top set order to 1 //GiveUserDefined&#40;1&#41; elimimlines&#40;1&#41; // 32 bit * if invreturn == .T. * msgStop&#40;"Your inventory turnover rate is not correct therefore reports will not be available. Please return to cost of goods sold and correct this condition! "&#41; * return nil * endif gl->&#40;dbseek&#40;"1000"&#41;&#41; if gl->dif12 == 2 MsgStop&#40;"Your beginning balances are not in balance. Therefore reports are not available until the beginning balances have been balanced."; , "Beginning Balance Sheet Out Of Balance " &#41; return nil endif gl->&#40;dbseek&#40;"1000"&#41;&#41; if gl->ty13=0 msgStop&#40;"There are no sales indicated therefore reports are not available."&#41; return nil endif gl->&#40;dbseek&#40;"9001"&#41;&#41; mYear &#58;= gl->a13 aMonth &#58;= amonth&#40;.t.&#41; DEFINE FONT oFont7 NAME "Ms Sans Serif" SIZE 0,-12 DEFINE DIALOG oDlg RESOURCE "cmpmonth" OF oWnd1 helpid mhelp font ofont7 //REDEFINE GET oGet VAR nMonth ID 104 of oDlg PICTURE "99" update valid range&#40;&#41; REDEFINE COMBOBOX oCBX VAR xMonth ITEMS aMonth ; ID 104 OF oDlg on change&#40;nMonth &#58;= ascan&#40;aMonth,xMonth&#41;&#41; REDEFINE BUTTON ID 4001 of oDlg ACTION odlg&#58;End&#40;&#41; ACTIVATE DIALOG oDlg centered cursorwait&#40;&#41; cMonth &#58;= month&#91;nMonth&#93; nFilterType &#58;= SalesTreat&#40;&#41; if nFilterType <= 5 gl->&#40;dbseek&#40;"2001"&#41;&#41; gl->ty13 &#58;= .0001 * gl->&#40;dbseek&#40;"2040"&#41;&#41; * gl->ty13 &#58;= .0001 * * gl->&#40;dbseek&#40;"2041"&#41;&#41; * gl->ty13 &#58;= .0001 gl->&#40;dbseek&#40;"2050"&#41;&#41; gl->ty13 &#58;= .0001 endif gl->&#40;dbseek&#40;"2004"&#41;&#41; do while .NOT. EOF&#40;&#41; if gl->act1 +; gl->act2 +; gl->act3 +; gl->act4 +; gl->act5 +; gl->act6 +; gl->act7 +; gl->act8 +; gl->act9 +; gl->act10 +; gl->act11 +; gl->act12 <> 0 .and. gl->ty13 <= 0 // 1/16/01 add Less than < // to accept negative numbers gl->ty13 &#58;= .001 endif skip enddo gl->&#40;dbseek&#40;"3800"&#41;&#41; gl->ty1 &#58;= 0 gl->ty2 &#58;= 0 gl->ty3 &#58;= 0 gl->ty4 &#58;= 0 gl->ty5 &#58;= 0 gl->ty6 &#58;= 0 gl->ty7 &#58;= 0 gl->ty8 &#58;= 0 gl->ty9 &#58;= 0 gl->ty10 &#58;= 0 gl->ty11 &#58;= 0 gl->ty12 &#58;= 0 gl->ty13 &#58;= 0 gl->act1 &#58;= 0 gl->act2 &#58;= 0 gl->act3 &#58;= 0 gl->act4 &#58;= 0 gl->act5 &#58;= 0 gl->act6 &#58;= 0 gl->act7 &#58;= 0 gl->act8 &#58;= 0 gl->act9 &#58;= 0 gl->act10 &#58;= 0 gl->act11 &#58;= 0 gl->act12 &#58;= 0 gl->&#40;dbgotop&#40;&#41;&#41; select gl do case case nFilterType == 1 // ONE LINE COST OF GOODS SOLD gl->&#40;dbseek&#40;"2040"&#41;&#41; gl->title &#58;= "Cost of sales" if nfp == .T. gl->title &#58;= "Total program costs" endif gl->&#40;dbseek&#40;"1000"&#41;&#41; if gl->title == "Collections " gl->title &#58;= "Sales" endif if nfp == .T. gl->title &#58;= "Revenue" endif set filter to .Not. Ty13 = 0 .And.; gl->account # '0900' .and. ; gl->account # '0125' .and. ; gl->account # '0150' .and. ; gl->account # '0175' .and. ; gl->account # '2039' .and. ; gl->account # '2044' .and. ; gl->account # '3601' .and. ; gl->account # '5610' .and. ; gl->account # '2053' .and. ; gl->account # '2054' .and. ; gl->account # '2514' .and. ; gl->account # '2515' .and. ; gl->account # '2632' .and. ; gl->account # '2634' .and. ; gl->account # '2733' .and. ; gl->account # '2734' .and. ; gl->account # '2833' .and. ; gl->account # '2834' .and. ; gl->account # '2933' .and. ; gl->account # '2934' .and. ; gl->account # '2998' .and. ; gl->account # '2999' .and. ; gl->account # '3355' .and. ; gl->account # '3356' .and. ; gl->account # '3485' .and. ; gl->account # '3487' .and. ; ! &#40;gl->account >= '2004' .and. gl->account <= '2008'&#41; .and. ; ! &#40;gl->account >= '2010' .and. gl->account <= '2038'&#41; .and. ; ! &#40;gl->account >= '6000'&#41; case nFilterType == 2 // MATERIAL, LABOR, OVERHEAD & FIXED COSTS gl->&#40;dbseek&#40;"2040"&#41;&#41; gl->title &#58;= "Cost of sales" if nfp == .T. gl->title &#58;= "Total program costs" endif gl->&#40;dbseek&#40;"1000"&#41;&#41; if gl->title == "Collections " gl->title &#58;= "Sales" endif if nfp == .T. gl->title &#58;= "Revenue" endif set filter to .Not. Ty13 = 0 .And.; gl->account # '0900' .and. ; gl->account # '0125' .and. ; gl->account # '0150' .and. ; gl->account # '0175' .and. ; gl->account # '2044' .and. ; gl->account # '5610' .and. ; gl->account # '3601' .and. ; gl->account # '2053' .and. ; gl->account # '2054' .and. ; gl->account # '2514' .and. ; gl->account # '2515' .and. ; gl->account # '2632' .and. ; gl->account # '2634' .and. ; gl->account # '2733' .and. ; gl->account # '2734' .and. ; gl->account # '2833' .and. ; gl->account # '2834' .and. ; gl->account # '2933' .and. ; gl->account # '2934' .and. ; gl->account # '2998' .and. ; gl->account # '2999' .and. ; gl->account # '3355' .and. ; gl->account # '3356' .and. ; gl->account # '3485' .and. ; gl->account # '3487' .and. ; ! &#40;gl->account >= '2004' .and. gl->account <= '2008'&#41; .and. ; ! &#40;gl->account >= '2022' .and. gl->account <= '2029'&#41; .AND. ; ! &#40;gl->account >= '2031' .and. gl->account <= '2038'&#41; .AND. ; ! &#40;gl->account >= '6000'&#41; case nFilterType == 3 // DETAIL COST OF GOODS SOLD //SET BACK TO NO DISPLAY gl->&#40;dbseek&#40;"2024"&#41;&#41; do while gl->account <= "2038" if gl->ty13 == 0 gl->ty13 &#58;= .0001 endif gl->&#40;dbskip&#40;&#41;&#41; enddo gl->&#40;dbseek&#40;"2040"&#41;&#41; gl->title &#58;= "Cost of sales" if nfp == .T. gl->title &#58;= "Total program costs" endif gl->&#40;dbseek&#40;"1000"&#41;&#41; if gl->title == "Collections " gl->title &#58;= "Sales" endif if nfp == .T. gl->title &#58;= "Revenue" endif set filter to .Not. gl->ty13 = 0 .And.; gl->account # '0900' .and. ; gl->account # '0125' .and. ; gl->account # '0150' .and. ; gl->account # '0175' .and. ; gl->account # '2019' .and. ; gl->account # '2021' .and. ; gl->account # '2030' .AND. ; gl->account # '2044' .and. ; gl->account # '3601' .AND. ; gl->account # '5610' .and. ; gl->account # '2053' .and. ; gl->account # '2054' .and. ; gl->account # '2514' .and. ; gl->account # '2515' .and. ; gl->account # '2632' .and. ; gl->account # '2634' .and. ; gl->account # '2733' .and. ; gl->account # '2734' .and. ; gl->account # '2833' .and. ; gl->account # '2834' .and. ; gl->account # '2933' .and. ; gl->account # '2934' .and. ; gl->account # '2998' .and. ; gl->account # '2999' .and. ; gl->account # '3355' .and. ; gl->account # '3356' .and. ; gl->account # '3485' .and. ; gl->account # '3487' .and. ; ! &#40;gl->account >= '2004' .and. gl->account <= '2008'&#41; .and. ; ! &#40;gl->account >= '6000'&#41; case nFilterType == 5 // % COMPLETE gl->&#40;dbseek&#40;"2040"&#41;&#41; gl->title &#58;= "Job costs" gl->&#40;dbseek&#40;"1000"&#41;&#41; if gl->title == "Collections " gl->title &#58;= "Revenues" endif set filter to .Not. gl->ty13 = 0 .And.; gl->account # '0100' .and. ; gl->account # '0125' .and. ; gl->account # '0150' .and. ; gl->account # '0175' .and. ; gl->account # '2044' .and. ; gl->account # '3601' .and. ; gl->account # '5610' .and. ; gl->account # '2053' .and. ; gl->account # '2054' .and. ; gl->account # '2514' .and. ; gl->account # '2515' .and. ; gl->account # '2632' .and. ; gl->account # '2634' .and. ; gl->account # '2733' .and. ; gl->account # '2734' .and. ; gl->account # '2833' .and. ; gl->account # '2834' .and. ; gl->account # '2933' .and. ; gl->account # '2934' .and. ; gl->account # '2998' .and. ; gl->account # '2999' .and. ; gl->account # '3355' .and. ; gl->account # '3356' .and. ; gl->account # '3485' .and. ; gl->account # '3487' .and. ; ! &#40;gl->account >= '2010' .and. gl->account <= '2038'&#41; .and. ; ! &#40;gl->account >= '6000'&#41; endcase gl->&#40;dbgotop&#40;&#41;&#41; // CONVERT THIS YEAR &#40;TY&#41; FIELD NAME TO A CODE BLOCK cty &#58;= 'ty'+ ltrim&#40;str&#40;nMonth&#41;&#41; bTy &#58;= &&#40;"&#123;|| gl->" + cTy +"&#125;"&#41; // convert Actual Year &#40;ACT&#41; field name to a code block cAct &#58;= 'act'+ ltrim&#40;str&#40;nMonth&#41;&#41; bAct &#58;= &&#40;"&#123;|| gl->" + cAct +"&#125;"&#41; // DIFFERENCES. . . bDiff &#58;= &&#40;"&#123;|| gl->" + cTy + " - gl->" + cAct +"&#125;"&#41; grabSales&#40;bSeek&#41; SubTotal&#40;&#41; grabSales&#40;bSeek&#41; act1 &#58;= &#123;|| cAct&#125; // NEW 6/26/99 .. ADDED SO AS TO CALCULATE IF DATA IMPORTED subtotal&#40;1&#41; subtotal&#40;2&#41; subtotal&#40;3&#41; subtotal&#40;4&#41; subtotal&#40;5&#41; //subtotal&#40;6&#41; subtotal&#40;7&#41; subtotal&#40;8&#41; subtotal&#40;9&#41; subtotal&#40;10&#41; subtotal&#40;11&#41; * expcf->&#40;dbseek&#40;"z Total"&#41;&#41; * if expcf->usepercomp == .T. // FLAGS USING PERCENT COMPLETE * select gl * subtotal&#40;6&#41; * endif // new departments 1-5 // set order to 3 removeDash&#40;.t.&#41; nIndex &#58;= openit&#40;&#41; gl->&#40;dbsetorder&#40;nIndex&#41;&#41; DEFINE FONT oFont7 NAME "Ms Sans Serif" SIZE 0,-12 DEFINE DIALOG oDlg1 RESOURCE "cmpbrowse" of oWnd1 font ofont7 REDEFINE xBROWSE oBrw ID 101 OF oDlg1 cell lines fastedit autocols //COLOR CLR_RED,CLR_HGRAY WITH OBJECT oBrw&#58;oCol&#40; "Title" &#41; b &#58;= &#58;bOnPostEdit &#58;nEditType &#58;= EDIT_GET &#58;OnPostEdit &#58;= &#123; |o,x,n| Eval&#40; o,x,n &#41;, o&#58;oBrw&#58;GoDown&#40;&#41; &#125; END getcoors&#40;ownd1&#58;nTop,ownd1&#58;nLeft,ownd1&#58;nBottom,ownd1&#58;nRight&#41; if oWnd1&#58;nRight >= 1020 //.AND. oWnd1&#58;nRight <= 1032&#41; oDlg1&#58;bResized &#58;= ; &#123;|| aRect &#58;= GetWndRect&#40;oDlg1&#58;hWnd&#41;, ; oBrw&#58;Move&#40; 14,18,arect&#91; 4 &#93;-arect&#91; 2 &#93; - 27, ; aRect&#91;3&#93;-aRect&#91;1&#93;-142,.t.&#41;; ,oSay1&#58;move&#40;arect&#91;3&#93; -aRect&#91;1&#93;- 124,30 ,,,.t.&#41;; //105 ,oSay2&#58;move&#40;arect&#91;3&#93; -aRect&#91;1&#93;- 124,200 ,,,.t.&#41;; //104 ,oSay3&#58;move&#40;arect&#91;3&#93; -aRect&#91;1&#93;- 124,600 ,,,.t.&#41;; //107 ,oBmp1&#58;move&#40;arect&#91;3&#93; -aRect&#91;1&#93;- 124,750 ,,,.t.&#41;; //106 ,oBtn2&#58;move&#40;arect&#91;3&#93; -aRect&#91;1&#93;- 100,30 ,,,.t.&#41;; //14 ,oBtn3&#58;move&#40;arect&#91;3&#93; -aRect&#91;1&#93;- 100,230 ,,,.t.&#41;; //4002 ,oBtn1&#58;move&#40;arect&#91;3&#93; -aRect&#91;1&#93;- 100,430 ,,,.t.&#41;; //4002 ,oBrw&#58;refresh&#40;&#41; &#125; //103 // oBrw&#58;Move&#40; 14,18,arect&#91; 4 &#93;-arect&#91; 2 &#93; - 27, ; // aRect&#91;3&#93;-aRect&#91;1&#93;-115,.t.&#41;; endif // 796 if &#40;oWnd1&#58;nRight > 600 .AND. oWnd1&#58;nRight < 1020&#41; oDlg1&#58;bResized &#58;= ; &#123;|| aRect &#58;= GetWndRect&#40;oDlg1&#58;hWnd&#41;, ; oBrw&#58;Move&#40; 14,18,arect&#91; 4 &#93;-arect&#91; 2 &#93; - 27, ; aRect&#91;3&#93;-aRect&#91;1&#93;-115,.t.&#41;; ,oSay1&#58;move&#40;arect&#91;3&#93; -aRect&#91;1&#93;- 91,30 ,,,.t.&#41;; //105 ,oSay2&#58;move&#40;arect&#91;3&#93; -aRect&#91;1&#93;- 91,200 ,,,.t.&#41;; //104 ,oSay3&#58;move&#40;arect&#91;3&#93; -aRect&#91;1&#93;- 91,600 ,,,.t.&#41;; //107 ,oBmp1&#58;move&#40;arect&#91;3&#93; -aRect&#91;1&#93;- 91,750 ,,,.t.&#41;; //106 ,oBtn2&#58;move&#40;arect&#91;3&#93; -aRect&#91;1&#93;- 61,30 ,,,.t.&#41;; //14 ,oBtn3&#58;move&#40;arect&#91;3&#93; -aRect&#91;1&#93;- 61,230 ,,,.t.&#41;; //4002 ,oBtn1&#58;move&#40;arect&#91;3&#93; -aRect&#91;1&#93;- 61,430 ,,,.t.&#41;; //4002 ,oBrw&#58;refresh&#40;&#41; &#125; //103 endif * oBrw&#58;lMChange &#58;= .t. // disable mousemove oBrw&#58;nFreeze &#58;= 2 // freeze first column * oBrw&#58;nAdjColumn &#58;= 1 // expand this column to flush table right * oBrw&#58;nClrForeHead &#58;= CLR_WHITE * oBrw&#58;nClrBackHead &#58;= CLR_BLUE * oBrw&#58;nClrBackFocus &#58;= CLR_YELLOW //RGB&#40;22,245,84&#41; * oBrw&#58;nClrForeFocus &#58;= CLR_BLACK * oBrw&#58;lNoHScroll &#58;= .f. // don't use that pesky horiz scroll bar * oBrw&#58;lNoGrayBar &#58;= .f. * // oBrw&#58;bLDblClick &#58;= &#123;| nRow, nCol | picard&#40;oBrw, nRow, nCol,0 &#41;&#125; //oBrw&#58;bKeyChar &#58;= &#123;| nKey, nRow,nCol | if&#40;nKey= 55, editCell&#40;oBrw,nRow,nCol&#41;,""&#41; &#125; //oBrw&#58;fastedit &#58;= .T. * oBrw&#58;bRClicked &#58;= &#123;| nRow,nCol | buildx&#40;oBrw, nRow, nCol, odlg,1&#41;,oBrw&#58;refresh&#40;&#41;,oBrw&#58;setfocus&#40;&#41;&#125; ADD COLUMN TO oBrw; DATA FIELDBLOCK &#40;&#40;"title"&#41;,Select&#40;"gl"&#41;&#41; ; SIZE 165 LEFT HEADER "Title"; EDITABLE; COLOR If&#40; gl->title == Repli&#40;"-",30&#41;,CLR_WHITE,&#41;, &#123;|| CLR_WHITE &#125; ADD COLUMN TO oBrw; DATA &#123;|| if&#40;gl->title == repli&#40;'-', 30&#41;, repli&#40;' ', 30&#41;, ; if&#40;gl->title == repli&#40;'=', 30&#41;, repli&#40;' ', 30&#41;, ; if&#40;gl->title == repli&#40;' ', 30&#41;, repli&#40;' ', 30&#41;, ; trans&#40; eval&#40;bTy&#41;, '999,999,999'&#41; &#41;&#41;&#41; &#125;; SIZE 100 RIGHT HEADER "Plan" +" "+cMonth ADD COLUMN TO oBrw; DATA &#123;|| if&#40;gl->title == repli&#40;'-', 30&#41;, repli&#40;' ', 5&#41;, ; if&#40;gl->title == repli&#40;'=', 30&#41;, repli&#40;' ', 5&#41;, ; if&#40;gl->title == repli&#40;' ', 30&#41;, repli&#40;' ', 5&#41;, ; trans&#40; 100* &#40;eval&#40;bTy&#41;/nsPlanMonth&#41;, '@Z 999.9'&#41;&#41; &#41;&#41; &#125;; SIZE 50 RIGHT HEADER " %" ADD COLUMN TO oBrw; SIZE 100 RIGHT PICTURE "999,999,999" ; //"rb/rb", "w+/rb" DATA FIELDWBLOCK &#40;eval&#40;act1&#41;,Select&#40;"gl"&#41;&#41; ; HEADER "Actual"+" "+cMonth ; COLOR CLR_WHITE, CLR_CYAN EDITABLE ADD COLUMN TO oBrw; DATA &#123;|| if&#40;gl->title == repli&#40;'-', 30&#41;, repli&#40;' ', 5&#41;, ; if&#40;gl->title == repli&#40;'=', 30&#41;, repli&#40;' ', 5&#41;, ; if&#40;gl->title == repli&#40;' ', 30&#41;, repli&#40;' ', 5&#41;, ; trans&#40; 100*&#40;eval&#40;bAct&#41;/nsActMonth&#41;, '@Z 999.9'&#41;&#41; &#41;&#41; &#125;; SIZE 50 RIGHT HEADER " %" ADD COLUMN TO oBrw; DATA &#123;|| if&#40;gl->title == repli&#40;'-', 30&#41;, repli&#40;' ', 11&#41;, ; if&#40;gl->title == repli&#40;'=', 30&#41;, repli&#40;' ', 11&#41;, ; if&#40;gl->title == repli&#40;' ', 30&#41;, repli&#40;' ', 11&#41;, ; trans&#40; fixsign&#40;bdiff&#41;, '999,999,999'&#41; &#41;&#41;&#41; &#125;; SIZE 100 RIGHT HEADER "Diff."+" "+cMonth ADD COLUMN TO oBrw; DATA &#123;|| if&#40;gl->title == repli&#40;'-', 30&#41;, repli&#40;' ', 11&#41;, ; if&#40;gl->title == repli&#40;'=', 30&#41;, repli&#40;' ', 11&#41;, ; if&#40;gl->title == repli&#40;' ', 30&#41;, repli&#40;' ', 11&#41;, ; trans&#40; PostYTD&#40;&#41;, '999,999,999'&#41;&#41; &#41;&#41; &#125;; SIZE 100 RIGHT HEADER "Plan YTD" ADD COLUMN TO oBrw; DATA &#123;|| if&#40;gl->title == repli&#40;'-', 30&#41;, repli&#40;' ', 5&#41;, ; if&#40;gl->title == repli&#40;'=', 30&#41;, repli&#40;' ', 5&#41;, ; if&#40;gl->title == repli&#40;' ', 30&#41;, repli&#40;' ', 5&#41;, ; trans&#40; 100*&#40;PostYTD&#40;&#41;/nsPlanYTD&#41;, '@Z 999.9'&#41; &#41;&#41;&#41; &#125;; SIZE 50 RIGHT HEADER " %" ADD COLUMN TO oBrw; DATA &#123;|| if&#40;gl->title == repli&#40;'-', 30&#41;, repli&#40;' ', 11&#41;, ; if&#40;gl->title == repli&#40;'=', 30&#41;, repli&#40;' ', 11&#41;, ; if&#40;gl->title == repli&#40;' ', 30&#41;, repli&#40;' ', 11&#41;, ; trans&#40; PostActual&#40;oBrw&#41;, '999,999,999'&#41; &#41;&#41;&#41; &#125;; SIZE 100 RIGHT HEADER "Actual YTD" ADD COLUMN TO oBrw; DATA &#123;|| if&#40;gl->title == repli&#40;'-', 30&#41;, repli&#40;' ', 5&#41;, ; if&#40;gl->title == repli&#40;'=', 30&#41;, repli&#40;' ', 5&#41;, ; if&#40;gl->title == repli&#40;' ', 30&#41;, repli&#40;' ', 5&#41;, ; trans&#40; 100 * &#40;PostActual&#40;oBrw&#41;/nsActYTD&#41;, '@Z 999.9'&#41;&#41; &#41;&#41; &#125;; SIZE 50 RIGHT HEADER " %" ADD COLUMN TO oBrw; DATA &#123;|| if&#40;gl->title == repli&#40;'-', 30&#41;, repli&#40;' ', 11&#41;, ; if&#40;gl->title == repli&#40;'=', 30&#41;, repli&#40;' ', 11&#41;, ; if&#40;gl->title == repli&#40;' ', 30&#41;, repli&#40;' ', 11&#41;, ; trans&#40; nFixSign&#40;PostYTD&#40;&#41; - PostActual&#40;oBrw&#41; &#41;, '999,999,999'&#41; &#41;&#41;&#41; &#125;; SIZE 100 RIGHT HEADER "Diff YTD" REDEFINE say oSay1 ID 105 OF ODLG1 REDEFINE say oSay2 ID 104 OF ODLG1 REDEFINE say oSay3 ID 107 OF ODLG1 REDEFINE BTNBMP oBmp1 ID 106 OF ODLG1 file "TESTBMP2.BMP" REDEFINE BUTTON oBtn1 ID 4002 OF ODLG1 ; ACTION&#40;buildx&#40;oBrw, " ", " ", odlg,2&#41;,ODLG1&#58;END&#40;&#41;&#41; REDEFINE BUTTON oBtn2 ID 9 OF ODLG1 ; ACTION clearact&#40;&#41; REDEFINE BUTTON oBtn3 ID 8 OF ODLG1 ; ACTION&#40;removeDash&#40;.f.&#41;,prnpalcmp&#40;1,3,.f.,nIndex&#41;,removeDash&#40;.t.&#41;&#41; oBmp1&#58;ctooltip&#58;= " To add a <user defined> expense to any expense department "+CRLF+; " right click on the department's total line and a <user defined> "+CRLF+; " expense will be added to the department selected." if small_font <= 96 .OR. oWnd1&#58;nRight >= 1020 activate dialog oDlg1 centered on init&#40;odlg1&#58;maximize&#40;&#41;,oBrw&#58;setfocus&#40;&#41;&#41; else activate dialog oDlg1 centered on init&#40;oBrw&#58;setfocus&#40;&#41;&#41; endif removeDash&#40;.f.&#41; gl->&#40;dbsetorder&#40;setOrder&#41;&#41; gl->&#40;dbsetfilter&#40;oldFilter&#41;&#41; return nil // static function range&#40;&#41; cursorWait&#40;&#41; if nMonth > 12 msgStop&#40;"You are out of range the month should be 1 to 12. "&#41; return .F. endif return .T. function AcctCatagory&#40;&#41; local nCatagory &#58;= 0 if val&#40;gl->account&#41; >= 2004 .and. val&#40;gl->account&#41; <= 2008 nCatagory &#58;= 6 return nCatagory elseif val&#40;gl->account&#41; >= 1500 .and. val&#40;gl->account&#41; <= 2041 nCatagory &#58;= 1 return nCatagory elseif val&#40;gl->account&#41; >= 2055 .and. val&#40;gl->account&#41; <= 2500 nCatagory &#58;= 2 elseif val&#40;gl->account&#41; >= 3000 .and. val&#40;gl->account&#41; <= 3353 nCatagory &#58;= 3 elseif val&#40;gl->account&#41; >= 3360 .and. val&#40;gl->account&#41; <= 3480 nCatagory &#58;= 4 elseif val&#40;gl->account&#41; >= 3491 .and. val&#40;gl->account&#41; <= 3544 nCatagory &#58;= 5 elseif val&#40;gl->account&#41; >= 2520 .and. val&#40;gl->account&#41; <= 2625 nCatagory &#58;= 7 elseif val&#40;gl->account&#41; >= 2635 .and. val&#40;gl->account&#41; <= 2720 nCatagory &#58;= 8 elseif val&#40;gl->account&#41; >= 2735 .and. val&#40;gl->account&#41; <= 2820 nCatagory &#58;= 9 elseif val&#40;gl->account&#41; >= 2835 .and. val&#40;gl->account&#41; <= 2920 nCatagory &#58;= 10 elseif val&#40;gl->account&#41; >= 2935 .and. val&#40;gl->account&#41; <= 2996 nCatagory &#58;= 11 elseif gl->account == '3805' .or. ; gl->account == '3801' .or. ; gl->account == '3815' .or. ; gl->account == '3802' .or. ; gl->account == '3808' .or. ; gl->account == '3810' .or. ; gl->account == '4000' .or. ; gl->account == '4030' nCatagory &#58;= 12 endif return nCatagoryfunction PostYTD&#40;&#41; local nValue &#58;= 0 local oldOrder &#58;= gl->&#40;indexord&#40;&#41;&#41; gl->&#40;dbsetorder&#40;1&#41;&#41; do case case nMonth == 1 nValue &#58;= GL->TY1 case nMonth == 2 nValue &#58;= GL->TY1 + GL->TY2 case nMonth == 3 nValue &#58;= GL->TY1 + GL->TY2 + GL->TY3 case nMonth == 4 nValue &#58;= GL->TY1 + GL->TY2 + GL->TY3 + GL->TY4 case nMonth == 5 nValue &#58;= GL->TY1 + GL->TY2 + GL->TY3 + GL->TY4 + GL->TY5 case nMonth == 6 nValue &#58;= GL->TY1 + GL->TY2 + GL->TY3 + GL->TY4 + GL->TY5 + GL->TY6 case nMonth == 7 nValue &#58;= GL->TY1 + GL->TY2 + GL->TY3 + GL->TY4 + GL->TY5 + GL->TY6 +; GL->TY7 case nMonth == 8 nValue &#58;= GL->TY1 + GL->TY2 + GL->TY3 + GL->TY4 + GL->TY5 + GL->TY6 +; GL->TY7 + GL->TY8 case nMonth == 9 nValue &#58;= GL->TY1 + GL->TY2 + GL->TY3 + GL->TY4 + GL->TY5 + GL->TY6 +; GL->TY7 + GL->TY8 + GL->TY9 case nMonth == 10 nValue &#58;= GL->TY1 + GL->TY2 + GL->TY3 + GL->TY4 + GL->TY5 + GL->TY6 +; GL->TY7 + GL->TY8 + GL->TY9 + GL->TY10 case nMonth == 11 nValue &#58;= GL->TY1 + GL->TY2 + GL->TY3 + GL->TY4 + GL->TY5 + GL->TY6 +; GL->TY7 + GL->TY8 + GL->TY9 + GL->TY10 + GL->TY11 case nMonth == 12 nValue &#58;= GL->TY1 + GL->TY2 + GL->TY3 + GL->TY4 + GL->TY5 + GL->TY6 +; GL->TY7 + GL->TY8 + GL->TY9 + GL->TY10 + GL->TY11 + GL->TY12 endcase subtotal&#40;1&#41; gl->&#40;dbsetorder&#40;oldOrder&#41;&#41; return nValue // end PostYTD&#40;&#41;function PostActual&#40;oBrw&#41; local nValue &#58;= 0 local oldOrder &#58;= gl->&#40;indexord&#40;&#41;&#41; gl->&#40;dbsetorder&#40;1&#41;&#41; do case case nMonth == 1 nValue &#58;= GL->act1 case nMonth == 2 nValue &#58;= GL->act1 + GL->act2 case nMonth == 3 nValue &#58;= GL->act1 + GL->act2 + GL->act3 case nMonth == 4 nValue &#58;= GL->act1 + GL->act2 + GL->act3 + GL->act4 case nMonth == 5 nValue &#58;= GL->act1 + GL->act2 + GL->act3 + GL->act4 + GL->act5 case nMonth == 6 nValue &#58;= GL->act1 + GL->act2 + GL->act3 + GL->act4 + GL->act5 + GL->act6 case nMonth == 7 nValue &#58;= GL->act1 + GL->act2 + GL->act3 + GL->act4 + GL->act5 + GL->act6 +; GL->act7 case nMonth == 8 nValue &#58;= GL->act1 + GL->act2 + GL->act3 + GL->act4 + GL->act5 + GL->act6 +; GL->act7 + GL->act8 case nMonth == 9 nValue &#58;= GL->act1 + GL->act2 + GL->act3 + GL->act4 + GL->act5 + GL->act6 +; GL->act7 + GL->act8 + GL->act9 case nMonth == 10 nValue &#58;= GL->act1 + GL->act2 + GL->act3 + GL->act4 + GL->act5 + GL->act6 +; GL->act7 + GL->act8 + GL->act9 + GL->act10 case nMonth == 11 nValue &#58;= GL->act1 + GL->act2 + GL->act3 + GL->act4 + GL->act5 + GL->act6 +; GL->act7 + GL->act8 + GL->act9 + GL->act10 + GL->act11 case nMonth == 12 nValue &#58;= GL->act1 + GL->act2 + GL->act3 + GL->act4 + GL->act5 + GL->act6 +; GL->act7 + GL->act8 + GL->act9 + GL->act10 + GL->act11 + GL->act12 endcase //subTotal&#40;1&#41; gl->&#40;dbsetorder&#40;oldOrder&#41;&#41; return nValue // end PostActual&#40;&#41; //function SubTotal&#40;object, nBegin&#41;function SubTotal&#40;nBegin&#41; local nOldPos &#58;= gl->&#40;recno&#40;&#41;&#41; local cAct &#58;= 'act'+ ltrim&#40;str&#40;nMonth&#41;&#41; local bAct &#58;= &&#40;"&#123;|| gl->" + cAct +"&#125;"&#41; local dAct &#58;= &&#40;"&#123;|| gl->" + cAct +"&#125;"&#41; local nSub &#58;= 0 local nCatagory local nSub1 &#58;= 0 local cStartAt local cStopat local cAccount local cAcct &#58;= gl->account local n2041 &#58;= 0 // gross profit local n3600 &#58;= 0 // total of all expenses local n3800 &#58;= 0 // net amt local n4020 &#58;= 0 // net before taxes local n4500 &#58;= 0 // net income/loss local n1000 &#58;= 0 // sales local n3805 &#58;= 0 // interest income local n3802 &#58;= 0 // interest cash balance local n3808 &#58;= 0 // interest/owner local n3810 &#58;= 0 // sale of assets local n4000 &#58;= 0 // other income local n4030 &#58;= 0 // income tax local n4040 &#58;= 0 // draws in P&L local n3480 &#58;= 0 // dept 3 local n3544 &#58;= 0 // dept 4 local n2625 &#58;= 0 // New dept 1 local n2720 &#58;= 0 // New dept 2 local n2820 &#58;= 0 // New dept 3 local n2920 &#58;= 0 // New dept 4 local n2996 &#58;= 0 // New dept 5 local n3996 &#58;= 0 // other income local n3998 &#58;= 0 // other income local n3801 &#58;= 0 // gain sale asset local n3815 &#58;= 0 // bonus local mAct1 &#58;= 0 local mAct2 &#58;= 0 local mAct3 &#58;= 0 local mAct4 &#58;= 0 local mAct5 &#58;= 0 local mAct6 &#58;= 0 local mAct7 &#58;= 0 local mAct8 &#58;= 0 local mAct9 &#58;= 0 local mAct10 &#58;= 0 local mAct11 &#58;= 0 local mAct12 &#58;= 0 local nDontDo &#58;= 1 local nGross &#58;= 0 local nDisc &#58;= 0 local nNetSale &#58;= 0 local nGet &#58;= 0 local nWhatIsIt &#58;= 0 local oldOrder &#58;= gl->&#40;indexord&#40;&#41;&#41; cursorWait&#40;&#41; // cMovit&#58; this var value comes from picard&#40;&#41; // fix sales using gross and the disc. nGet &#58;= whatField&#40;&#41; select gl set filter to gl->&#40;dbsetorder&#40;1&#41;&#41; if gl->account == "1000" gl->&#40;dbseek&#40;"1000"&#41;&#41; nWhatIsIt &#58;= gl->&#40;fieldget&#40;nGet&#41;&#41; gl->&#40;dbseek&#40;"0900"&#41;&#41; if gl->ty13 <> 0 if gl->act1 <= 1 gl->act1 &#58;= .0001 endif if gl->act2 <= 1 gl->act2 &#58;= .0001 endif if gl->act3 <= 1 gl->act3 &#58;= .0001 endif if gl->act4 <= 1 gl->act4 &#58;= .0001 endif if gl->act5 <= 1 gl->act5 &#58;= .0001 endif if gl->act6 <= 1 gl->act6 &#58;= .0001 endif if gl->act7 <= 1 gl->act7 &#58;= .0001 endif if gl->act8 <= 1 gl->act8 &#58;= .0001 endif if gl->act9 <= 1 gl->act9 &#58;= .0001 endif if gl->act10 <= 1 gl->act10 &#58;= .0001 endif if gl->act11 <= 1 gl->act11 &#58;= .0001 endif if gl->act12 <= 1 gl->act12 &#58;= .0001 endif gl->&#40;dbseek&#40;"0950"&#41;&#41; if gl->act1 <= 1 gl->act1 &#58;= .0001 endif if gl->act2 <= 1 gl->act2 &#58;= .0001 endif if gl->act3 <= 1 gl->act3 &#58;= .0001 endif if gl->act4 <= 1 gl->act4 &#58;= .0001 endif if gl->act5 <= 1 gl->act5 &#58;= .0001 endif if gl->act6 <= 1 gl->act6 &#58;= .0001 endif if gl->act7 <= 1 gl->act7 &#58;= .0001 endif if gl->act8 <= 1 gl->act8 &#58;= .0001 endif if gl->act9 <= 1 gl->act9 &#58;= .0001 endif if gl->act10 <= 1 gl->act10 &#58;= .0001 endif if gl->act11 <= 1 gl->act11 &#58;= .0001 endif if gl->act12 <= 1 gl->act12 &#58;= .0001 endif gl->&#40;dbseek&#40;"0900"&#41;&#41; nGross &#58;= fieldget&#40;nGet&#41; gl->&#40;dbseek&#40;"0950"&#41;&#41; nDisc &#58;= fieldget&#40;nGet&#41; else gl->&#40;dbseek&#40;"0900"&#41;&#41; gl->act1 &#58;= 0 gl->act2 &#58;= 0 gl->act3 &#58;= 0 gl->act4 &#58;= 0 gl->act5 &#58;= 0 gl->act6 &#58;= 0 gl->act7 &#58;= 0 gl->act8 &#58;= 0 gl->act9 &#58;= 0 gl->act10 &#58;= 0 gl->act11 &#58;= 0 gl->act12 &#58;= 0 gl->&#40;dbseek&#40;"0950"&#41;&#41; gl->act1 &#58;= 0 gl->act2 &#58;= 0 gl->act3 &#58;= 0 gl->act4 &#58;= 0 gl->act5 &#58;= 0 gl->act6 &#58;= 0 gl->act7 &#58;= 0 gl->act8 &#58;= 0 gl->act9 &#58;= 0 gl->act10 &#58;= 0 gl->act11 &#58;= 0 gl->act12 &#58;= 0 endif gl->&#40;dbseek&#40;"1000"&#41;&#41; if gl->act1 <= 1 gl->act1 &#58;= .0001 endif if gl->act2 <= 1 gl->act2 &#58;= .0001 endif if gl->act3 <= 1 gl->act3 &#58;= .0001 endif if gl->act4 <= 1 gl->act4 &#58;= .0001 endif if gl->act5 <= 1 gl->act5 &#58;= .0001 endif if gl->act6 <= 1 gl->act6 &#58;= .0001 endif if gl->act7 <= 1 gl->act7 &#58;= .0001 endif if gl->act8 <= 1 gl->act8 &#58;= .0001 endif if gl->act9 <= 1 gl->act9 &#58;= .0001 endif if gl->act10 <= 1 gl->act10 &#58;= .0001 endif if gl->act11 <= 1 gl->act11 &#58;= .0001 endif if gl->act12 <= 1 gl->act12 &#58;= .0001 endif cAccount &#58;= "1000" nSub1 &#58;= nGross-nDisc if EMPTY&#40;cMovIt&#41; cMovit &#58;= "1000" endif if nSub1 <> nsActMOnth .AND. !EMPTY&#40;nsActMonth&#41; .AND. val&#40;cMovit&#41; < 1000 nSub &#58;= nSub1 else if nSub == 0 gl->&#40;dbseek&#40;"1000"&#41;&#41; nSub &#58;= nWhatIsIT if nSub == 0 nSub &#58;= .0001 endif endif endif if gl->&#40;dbseek&#40;cAccount&#41;&#41; fieldput&#40;fieldpos&#40;cAct&#41;,nSub&#41; endif endif if nBegin == nil nCatagory &#58;= AcctCatagory&#40;&#41; // ret 4 else nCatagory &#58;= nBegin endif if nCatagory == 1 // cost of goods sold cStartAt &#58;= '1500' cStopat &#58;= '2038' cAccount &#58;= '2040' select gl set filter to gl->&#40;dbseek&#40;"1500"&#41;&#41; do while gl->account <= '2038' if gl->ty13 > 1 nDontDo &#58;= 2 exit endif gl->&#40;dbskip&#40;&#41;&#41; enddo if nDontDo == 1 cStartAt &#58;= '2040' cStopat &#58;= '2040' cAccount &#58;= '2040' endif elseif nCatagory == 2 // dept 1 cStartAt &#58;= '2055' cStopat &#58;= '2490' cAccount &#58;= '2500' elseif nCatagory == 3 // dept 2 cStartAt &#58;= '3000' cStopat &#58;= '3351' cAccount &#58;= '3353' elseif nCatagory == 4 // dept 3 cStartAt &#58;= '3360' cStopat &#58;= '3460' cAccount &#58;= '3480' elseif nCatagory == 5 // dept 4 cStartAt &#58;= '3491' cStopat &#58;= '3542' cAccount &#58;= '3544' elseif nCatagory == 6 // % complete cStartAt &#58;= '2004' cStopat &#58;= '2008' cAccount &#58;= '2040' elseif nCatagory == 7 // New Dept 1 cStartAt &#58;= '2520' cStopat &#58;= '2615' cAccount &#58;= '2625' elseif nCatagory == 8 // New Dept 2 cStartAt &#58;= '2635' cStopat &#58;= '2709' cAccount &#58;= '2720' elseif nCatagory == 9 // New Dept 3 cStartAt &#58;= '2735' cStopat &#58;= '2809' cAccount &#58;= '2820' elseif nCatagory == 10 // New Dept 4 cStartAt &#58;= '2835' cStopat &#58;= '2908' cAccount &#58;= '2920' elseif nCatagory == 11 // New Dept 5 cStartAt &#58;= '2935' cStopat &#58;= '2994' cAccount &#58;= '2996' elseif nCatagory == 12 // DON'T DO ANYTHING YET endif if nCatagory == 1 .or. nCatagory == 2 .or. nCatagory == 3; .or. nCatagory == 4 .or. nCatagory == 5 .or. nCatagory == 6; .or. nCatagory == 7 .or. nCatagory == 8 .or. nCatagory == 9; .or. nCatagory == 10 .or. nCatagory == 11 nSub &#58;= 0 if gl->&#40;dbseek&#40;cStartAt&#41;&#41; do while gl->account <= cStopAt .and. ! gl->&#40;eof&#40;&#41;&#41; nsub += eval&#40;bact&#41; gl->&#40;dbskip&#40;&#41;&#41; enddo if gl->&#40;dbseek&#40;cAccount&#41;&#41; fieldput&#40;fieldpos&#40;cAct&#41;,nSub&#41; endif endif endif if nCatagory == 1 // cost of goods sold n2040 &#58;= nSub elseif nCatagory == 2 // selling expense n2500 &#58;= nsub elseif nCatagory == 3 // G and A n3353 &#58;= nSub elseif nCatagory == 4 // G and A n3480 &#58;= nSub elseif nCatagory == 5 // G and A n3544 &#58;= nSub elseif nCatagory == 6 // cost of goods sold n2040 &#58;= nSub elseif nCatagory == 7 // New Dept 1 n2625 &#58;= nSub elseif nCatagory == 8 // New Dept 2 n2720 &#58;= nSub elseif nCatagory == 9 // New Dept 3 n2820 &#58;= nSub elseif nCatagory == 10 // New Dept 4 n2920 &#58;= nSub elseif nCatagory == 11 // New Dept 5 n2996 &#58;= nSub endif if nFilterType == 1 // one liner - sales if gl->&#40;dbseek&#40;'2040'&#41;&#41; n2040 &#58;= eval&#40;bAct&#41; endif endif // FETCH VALUES // FUTURE&#58; BUILD AND ARRAY AND than DO A FOR/NEXT if gl->&#40;dbseek&#40;'1000'&#41;&#41; // SALES n1000 &#58;= fieldget&#40;fieldpos&#40;cAct&#41;&#41; endif if gl->&#40;dbseek&#40;'2040'&#41;&#41; // cost of goods sold if nCatagory == 1 // cost of goods sold fieldput&#40;fieldpos&#40;cAct&#41;,n2040 &#41; else n2040 &#58;= fieldget&#40;fieldpos&#40;cAct&#41;&#41; endif endif if gl->&#40;dbseek&#40;'2041'&#41;&#41; // GROSS PROFIT n2041 &#58;= fieldget&#40;fieldpos&#40;cAct&#41;&#41; endif if gl->&#40;dbseek&#40;'2500'&#41;&#41; // TOTAL SELLING EXPENSES n2500 &#58;= fieldget&#40;fieldpos&#40;cAct&#41;&#41; endif if gl->&#40;dbseek&#40;'3353'&#41;&#41; // TOTAL GA EXPENSES n3353 &#58;= fieldget&#40;fieldpos&#40;cAct&#41;&#41; endif if gl->&#40;dbseek&#40;'3480'&#41;&#41; // TOTAL SELLING EXPENSES n3480 &#58;= fieldget&#40;fieldpos&#40;cAct&#41;&#41; endif if gl->&#40;dbseek&#40;'3544'&#41;&#41; // TOTAL SELLING EXPENSES n3544 &#58;= fieldget&#40;fieldpos&#40;cAct&#41;&#41; endif if gl->&#40;dbseek&#40;'3805'&#41;&#41; // INTEREST INCOME n3805 &#58;= fieldget&#40;fieldpos&#40;cAct&#41;&#41; endif if gl->&#40;dbseek&#40;'3802'&#41;&#41; // INTEREST INCOME CASH BALANCE n3802 &#58;= fieldget&#40;fieldpos&#40;cAct&#41;&#41; endif if gl->&#40;dbseek&#40;'3801'&#41;&#41; // INTEREST INCOME CASH BALANCE n3801 &#58;= fieldget&#40;fieldpos&#40;cAct&#41;&#41; endif if gl->&#40;dbseek&#40;'3815'&#41;&#41; // INTEREST INCOME CASH BALANCE n3815 &#58;= fieldget&#40;fieldpos&#40;cAct&#41;&#41; endif if gl->&#40;dbseek&#40;'3808'&#41;&#41; // INTEREST/OWNER n3808 &#58;= fieldget&#40;fieldpos&#40;cAct&#41;&#41; endif if gl->&#40;dbseek&#40;'3810'&#41;&#41; // SALE OF ASSETS n3810 &#58;= fieldget&#40;fieldpos&#40;cAct&#41;&#41; endif if gl->&#40;dbseek&#40;'4000'&#41;&#41; // OTHER INCOME n4000 &#58;= fieldget&#40;fieldpos&#40;cAct&#41;&#41; endif if gl->&#40;dbseek&#40;'3996'&#41;&#41; // OTHER INCOME n3996 &#58;= fieldget&#40;fieldpos&#40;cAct&#41;&#41; endif if gl->&#40;dbseek&#40;'3998'&#41;&#41; // OTHER INCOME n3998 &#58;= fieldget&#40;fieldpos&#40;cAct&#41;&#41; endif if gl->&#40;dbseek&#40;'4020'&#41;&#41; // NET BEFORE TAX n4020 &#58;= fieldget&#40;fieldpos&#40;cAct&#41;&#41; endif if gl->&#40;dbseek&#40;'4030'&#41;&#41; // INCOME TAX n4030 &#58;= fieldget&#40;fieldpos&#40;cAct&#41;&#41; endif if gl->&#40;dbseek&#40;'4040'&#41;&#41; // INCOME TAX n4040 &#58;= fieldget&#40;fieldpos&#40;cAct&#41;&#41; endif if gl->&#40;dbseek&#40;'2625'&#41;&#41; // New Dept 1 n2625 &#58;= fieldget&#40;fieldpos&#40;cAct&#41;&#41; endif if gl->&#40;dbseek&#40;'2720'&#41;&#41; // New Dept 2 n2720 &#58;= fieldget&#40;fieldpos&#40;cAct&#41;&#41; endif if gl->&#40;dbseek&#40;'2820'&#41;&#41; // New Dept 3 n2820 &#58;= fieldget&#40;fieldpos&#40;cAct&#41;&#41; endif if gl->&#40;dbseek&#40;'2920'&#41;&#41; // New Dept 4 n2920 &#58;= fieldget&#40;fieldpos&#40;cAct&#41;&#41; endif if gl->&#40;dbseek&#40;'2996'&#41;&#41; // New Dept 5 n2996 &#58;= fieldget&#40;fieldpos&#40;cAct&#41;&#41; endif * n2041 &#58;= n1000 - n2040 // gross profit * n3600 &#58;= n2500 + n3353 // total of all expenses * n3800 &#58;= n2041 - n3600 // net amt * n4020 &#58;= n3800 + n3805 + n3802 +n3808 + n3810 + n4000 +n3801-n3815 // net before taxes * N4500 &#58;= N4020 - N4030 // NET INCOME/LOSS // UPDATE FIELDS if gl->&#40;dbseek&#40;'2041'&#41;&#41; // GROSS PROFIT n2041 &#58;= n1000 - n2040 fieldput&#40;fieldpos&#40;cAct&#41;, n2041 &#41; endif if gl->&#40;dbseek&#40;'3600'&#41;&#41; // TOTAL OF ALL EXPENSES n3600 &#58;= n2500 + n3353 + n3480 + n3544 +n2625+n2720+n2820+n2920+n2996 fieldput&#40;fieldpos&#40;cAct&#41;, n3600 &#41; endif if gl->&#40;dbseek&#40;'3800'&#41;&#41; // NET AMT //fieldput&#40;fieldpos&#40;cAct&#41;, n2041 - n3600&#41; gl->&#40;dbseek&#40;"3800"&#41;&#41; gl->ty1 &#58;= 0 gl->ty2 &#58;= 0 gl->ty3 &#58;= 0 gl->ty4 &#58;= 0 gl->ty5 &#58;= 0 gl->ty6 &#58;= 0 gl->ty7 &#58;= 0 gl->ty8 &#58;= 0 gl->ty9 &#58;= 0 gl->ty10 &#58;= 0 gl->ty11 &#58;= 0 gl->ty12 &#58;= 0 gl->ty13 &#58;= 0 gl->act1 &#58;= 0 gl->act2 &#58;= 0 gl->act3 &#58;= 0 gl->act4 &#58;= 0 gl->act5 &#58;= 0 gl->act6 &#58;= 0 gl->act7 &#58;= 0 gl->act8 &#58;= 0 gl->act9 &#58;= 0 gl->act10 &#58;= 0 gl->act11 &#58;= 0 gl->act12 &#58;= 0 gl->&#40;dbseek&#40;'2041'&#41;&#41; n2041 &#58;= fieldget&#40;fieldpos&#40;cTy&#41;&#41; gl->&#40;dbseek&#40;'3600'&#41;&#41; n3600 &#58;= fieldget&#40;fieldpos&#40;cTy&#41;&#41; * gl->&#40;dbseek&#40;'3800'&#41;&#41; // NET AMT * n3800 &#58;= fieldput&#40;fieldpos&#40;cTy&#41;, n2041 - n3600&#41; // PUT VALUE TO ORIGINAL gl->&#40;dbseek&#40;'2041'&#41;&#41; n2041 &#58;= fieldget&#40;fieldpos&#40;cAct&#41;&#41; gl->&#40;dbseek&#40;'3600'&#41;&#41; n3600 &#58;= fieldget&#40;fieldpos&#40;cAct&#41;&#41; * gl->&#40;dbseek&#40;'3800'&#41;&#41; // NET AMT * fieldput&#40;fieldpos&#40;cAct&#41;, n2041 - n3600&#41; endif if gl->&#40;dbseek&#40;'4020'&#41;&#41; // NET BEFORE TAXES fieldput&#40;fieldpos&#40;cAct&#41;,n2041 - n3600 + n3801 - n3815 + n3802 + n3805 + n3808 + n3810 + n4000+ n3996+ n3998 &#41; endif if gl->&#40;dbseek&#40;'4500'&#41;&#41; // NET INCOME/LOSS endif fieldput&#40;fieldpos&#40;cAct&#41;, n2041 - n3600 + n3801 - n3815+ n3802 + n3805 + n3808 + n3810 + n3996+ n3998+ n4000 - n4030-n4040&#41; nCalc&#40;&#41; fixthefilter&#40;&#41; gl->&#40;dbsetorder&#40;oldOrder&#41;&#41; gl->&#40;dbgoto&#40;nOldPos&#41;&#41; return nil // end function SubTotal&#40;&#41;static function SkipDB&#40;nSkipRequest, bWhileCond&#41; local nActSkip &#58;= 0 if nSkipRequest == 0 dbskip&#40;0&#41; elseif nSkipRequest > 0 .and. !eof&#40;&#41; // keep skipping until number of skips requested is satisfied do while nActSkip < nSkipRequest dbskip&#40;1&#41; // Evaluate condition to each record if !eval&#40; bWhileCond &#41; .or. eof&#40;&#41; dbskip&#40;-1&#41; exit endif nActSkip++ enddo elseif nSkipRequest < 0 do while nActSkip > nSkipRequest dbskip&#40;-1&#41; // This check is important! BOF bangs do not // sit on phantom record. Rather the top record // is evaluated, and may meet the condition if bof&#40;&#41; exit endif // Evaluate condition to each record if !eval&#40;bWhileCond&#41; dbskip&#40;1&#41; exit endif nActSkip-- enddo endif return nActSkip // end function SkipDB&#40;&#41; /* CONVERT SOME ACCOUNT DIFFERENCES TO NEGATIVE NUMBERS */function FixSign&#40;block&#41; local nValue &#58;= eval&#40;block&#41; if gl->account == '3805' .or. ; gl->account == '3801' .or. ; gl->account == '3815' .or. ; gl->account == '3802' .or. ; gl->account == '3810' .or. ; gl->account == '2041' .or. ; gl->account == '3800' .or. ; gl->account == '4020' .or. ; gl->account == '4500' .or. ; gl->account == '4000' .or. ; gl->account == '1000' nValue &#58;= nValue * -1 endif return nValue function nFixSign&#40;nValue&#41; if gl->account == '3805' .or. ; gl->account == '3801' .or. ; gl->account == '3815' .or. ; gl->account == '3802' .or. ; gl->account == '3810' .or. ; gl->account == '4000' .or. ; gl->account == '2041' .or. ; gl->account == '3800' .or. ; gl->account == '4020' .or. ; gl->account == '4500' .or. ; gl->account == '1000' nValue &#58;= nValue * -1 endif return nValue // end GL2.PRGfunction isCostofSales&#40;&#41; local retval &#58;= .f. //gl->&#40;dbseek&#40;'2010'&#41;&#41; gl->&#40;dbseek&#40;'1500'&#41;&#41; do while gl->account < '2039' if gl->ty13 # 0 ; .or. gl->act1 > 0 ; .or. gl->act2 > 0 ; .or. gl->act3 > 0 ; .or. gl->act4 > 0 ; .or. gl->act5 > 0 ; .or. gl->act6 > 0 ; .or. gl->act7 > 0 ; .or. gl->act8 > 0 ; .or. gl->act9 > 0 ; .or. gl->act10 > 0 ; .or. gl->act11 > 0 ; .or. gl->act12 > 0 retval &#58;= .T. exit endif gl->&#40;dbskip&#40;&#41;&#41; enddo return retvalfunction GrabSales&#40;bSeek&#41; local nOldPos &#58;= gl->&#40;recno&#40;&#41;&#41; local oldOrder &#58;= indexord&#40;&#41; gl->&#40;dbsetorder&#40;1&#41;&#41; gl->&#40;dbseek&#40;"1000"&#41;&#41; do while .T. if nMonth == 1 if gl->act1 == 0 gl->act1 &#58;= .001 endif nsPlanYTD &#58;= gl->ty1 nsActYTD &#58;= gl->act1 nsPlanMonth &#58;= gl->ty1 nsActMonth &#58;= gl->act1 exit endif if nMonth == 2 if gl->act2 == 0 gl->act2 &#58;= .001 endif nsPlanYTD &#58;= gl->ty1+gl->ty2 nsActYTD &#58;= gl->act1+gl->act2 nsPlanMonth &#58;= gl->ty2 nsActMonth &#58;= gl->act2 exit endif if nMonth == 3 if gl->act3 == 0 gl->act3 &#58;= .001 endif nsPlanYTD &#58;= gl->ty1+gl->ty2+gl->ty3 nsActYTD &#58;= gl->act1+gl->act2+gl->act3 nsPlanMonth &#58;= gl->ty3 nsActMonth &#58;= gl->act3 exit endif if nMonth == 4 if gl->act4 == 0 gl->act4 &#58;= .001 endif nsPlanYTD &#58;= gl->ty1+gl->ty2+gl->ty3+gl->ty4 nsActYTD &#58;= gl->act1+gl->act2+gl->act3+gl->act4 nsPlanMonth &#58;= gl->ty4 nsActMonth &#58;= gl->act4 exit endif if nMonth == 5 if gl->act5 == 0 gl->act5 &#58;= .001 endif nsPlanYTD &#58;= gl->ty1+gl->ty2+gl->ty3+gl->ty4+gl->ty5 nsActYTD &#58;= gl->act1+gl->act2+gl->act3+gl->act4+gl->act5 nsPlanMonth &#58;= gl->ty5 nsActMonth &#58;= gl->act5 exit endif if nMonth == 6 if gl->act6 == 0 gl->act6 &#58;= .001 endif nsPlanYTD &#58;= gl->ty1+gl->ty2+gl->ty3+gl->ty4+gl->ty5+gl->ty6 nsActYTD &#58;= gl->act1+gl->act2+gl->act3+gl->act4+gl->act5+gl->act6 nsPlanMonth &#58;= gl->ty6 nsActMonth &#58;= gl->act6 exit endif if nMonth == 7 if gl->act7 == 0 gl->act7 &#58;= .001 endif nsPlanYTD &#58;= gl->ty1+gl->ty2+gl->ty3+gl->ty4+gl->ty5+gl->ty6+gl->ty7 nsActYTD &#58;= gl->act1+gl->act2+gl->act3+gl->act4+gl->act5+gl->act6+gl->act7 nsPlanMonth &#58;= gl->ty7 nsActMonth &#58;= gl->act7 exit endif if nMonth == 8 if gl->act8 == 0 gl->act8 &#58;= .001 endif nsPlanYTD &#58;= gl->ty1+gl->ty2+gl->ty3+gl->ty4+gl->ty5+gl->ty6+gl->ty7+gl->ty8 nsActYTD &#58;= gl->act1+gl->act2+gl->act3+gl->act4+gl->act5+gl->act6+gl->act7+gl->act8 nsPlanMonth &#58;= gl->ty8 nsActMonth &#58;= gl->act8 exit endif if nMonth == 9 if gl->act9 == 0 gl->act9 &#58;= .001 endif nsPlanYTD &#58;= gl->ty1+gl->ty2+gl->ty3+gl->ty4+gl->ty5+gl->ty6+gl->ty7+gl->ty8+gl->ty9 nsActYTD &#58;= gl->act1+gl->act2+gl->act3+gl->act4+gl->act5+gl->act6+gl->act7+gl->act8+gl->act9 nsPlanMonth &#58;= gl->ty9 nsActMonth &#58;= gl->act9 exit endif if nMonth == 10 if gl->act10 == 0 gl->act10 &#58;= .001 endif nsPlanYTD &#58;= gl->ty1+gl->ty2+gl->ty3+gl->ty4+gl->ty5+gl->ty6+gl->ty7+gl->ty8+gl->ty9+gl->ty10 nsActYTD &#58;= gl->act1+gl->act2+gl->act3+gl->act4+gl->act5+gl->act6+gl->act7+gl->act8+gl->act9+gl->act10 nsPlanMonth &#58;= gl->ty10 nsActMonth &#58;= gl->act10 exit endif if nMonth == 11 if gl->act11 == 0 gl->act11 &#58;= .001 endif nsPlanYTD &#58;= gl->ty1+gl->ty2+gl->ty3+gl->ty4+gl->ty5+gl->ty6+gl->ty7+gl->ty8+gl->ty9+gl->ty10+gl->ty11 nsActYTD &#58;= gl->act1+gl->act2+gl->act3+gl->act4+gl->act5+gl->act6+gl->act7+gl->act8+gl->act9+gl->act10+gl->act11 nsPlanMonth &#58;= gl->ty11 nsActMonth &#58;= gl->act11 exit endif if nMonth == 12 if gl->act12 == 0 gl->act12 &#58;= .001 endif nsPlanYTD &#58;= gl->ty1+gl->ty2+gl->ty3+gl->ty4+gl->ty5+gl->ty6+gl->ty7+gl->ty8+gl->ty9+gl->ty10+gl->ty11+gl->ty12 nsActYTD &#58;= gl->act1+gl->act2+gl->act3+gl->act4+gl->act5+gl->act6+gl->act7+gl->act8+gl->act9+gl->act10+gl->act11+gl->act12 nsPlanMonth &#58;= gl->ty12 nsActMonth &#58;= gl->act12 exit endif enddo gl->&#40;dbsetorder&#40;OldOrder&#41;&#41; gl->&#40;dbgoto&#40;nOldPos&#41;&#41; return nilfunction SalesTreat&#40;&#41; local nSalesType &#58;= 0 lamount &#58;= .F. * expcf->&#40;dbseek&#40;"z Total"&#41;&#41; * if expcf->usepercomp == .T. // FLAGS USING PERCENT COMPLETE * nSalesType &#58;= 5 // % COMPLETE * return nSalesType * endif // 2002 if cfglob->costmeth == 1 if cfglob->costopt == 1 nSalesType &#58;= 1 // ONE LINE COST OF GOODS SOLD endif if cfglob->costopt == 2 nSalesType &#58;= 2 // MLO endif elseif cfglob->costmeth == 2 nSalesType &#58;= 2 // MLO elseif cfglob->costmeth == 3 nSalesType &#58;= 3 // DETAIL elseif cfglob->costmeth == 4 nSalesType &#58;= 1 // ONE LINE COST OF GOODS SOLD elseif cfglob->costmeth == 5 nSalesType &#58;= 5 // % COMPLETE endif if nSalesType == 0 nSalesType &#58;= 1 endif return nSalesType /* IS THERE A VALUE IN ANY FIELD TY13 FOR A RANGE OF ACCOUNTS? */function prnpalcmp&#40;mquick,mvar,lFilter,nIndex&#41; local oReport, oFont1, oFont2, oPrn, oPen1 local mforecast &#58;= "" local mfooter &#58;= "" local mbrket1 local mbrket2 local mbrket3 local mlen &#58;= 0 local newName local oldOrder &#58;= gl->&#40;indexord&#40;&#41;&#41; if nfp == .T. NewNAme &#58;= "Statement Of Activities" else NewNAme &#58;= "Profit And Loss" endif set filter to gl->&#40;dbsetorder&#40;1&#41;&#41; gl->&#40;dbseek&#40;"4500"&#41;&#41; if gl->ty1 <= -10000000 mlen &#58;= 1 elseif gl->ty2 <= -10000000 mlen &#58;= 1 elseif gl->ty3 <= -10000000 mlen &#58;= 1 elseif gl->ty4 <= -10000000 mlen &#58;= 1 elseif gl->ty5 <= -10000000 mlen &#58;= 1 elseif gl->ty6 <= -10000000 mlen &#58;= 1 elseif gl->ty7 <= -10000000 mlen &#58;= 1 elseif gl->ty8 <= -10000000 mlen &#58;= 1 elseif gl->ty9 <= -10000000 mlen &#58;= 1 elseif gl->ty10 <= -10000000 mlen &#58;= 1 elseif gl->ty11 <= -10000000 mlen &#58;= 1 elseif gl->ty12 <= -10000000 mlen &#58;= 1 endif if mlen == 1 mbrket1 &#58;= "999,999,999" mbrket2 &#58;= " 99,999,999" mbrket3 &#58;= " 999.99" else mbrket1 &#58;= "@&#41; 999,999,999" mbrket2 &#58;= "@&#41; 99,999,999" mbrket3 &#58;= "@&#41; 999.99" endif anote->&#40;dbseek&#40;"4500"&#41;&#41; mfooter &#58;= rtrim&#40;anote->edit&#41; mforecast &#58;= company->prtname mforecast &#58;= rtrim&#40;mforecast&#41; gl->&#40;dbgotop&#40;&#41;&#41; elimimlines&#40;1&#41; gl->&#40;dbgotop&#40;&#41;&#41; newFilter&#40;&#41; //gl->&#40;dbsetorder&#40;nIndex&#41;&#41; if company->alpha == 3 gl->&#40;dbsetorder&#40;3&#41;&#41; endif if company->alpha == 2 //.AND. mvar == 1 gl->&#40;dbsetorder&#40;2&#41;&#41; endif define font oFont1 name "Arial" size 4,7 define font oFont2 name "Arial" size 8,12 BOLD define pen oPen1 width 1 gl->&#40;dbgotop&#40;&#41;&#41; PRINT oPrn NAME "SET_LANDSCAPE" prnlandscape&#40;&#41;ENDPRINTif mvar == 3 if msgYesNo&#40;"Do you wish to view a print preview?"&#41; REPORT oReport; TITLE rtrim&#40;mcompname&#41;,; +NewName+" "+ mForecast+"/"+"Actual "+" "+str&#40;mYear,4,0&#41; CENTERED; FONT oFont1,; oFont2; PEN oPen1; HEADER "Date&#58; "+dtoc&#40;date&#40;&#41;&#41;+" Time&#58; "+time&#40;&#41;+spac
edit browse
I've done every thing possible but onPostEdit doesn't seem to work at all in a browse from resources. All I'm trying to do is after editing the cell have the program automatically move to the next cell below.Works in a brows from code but not from a browse from resources.HELP
edit browse
Came up with my own userdefined function and it is not pretty but works.
edit data
Hello friends, Editing data is essential for my programs. Therefore, I take some more notes about the logic to remember later how I did it. There is much new stuff for me with web programming. You need much time to discover how to do. So, it is better to take notes than start searching from the start. Best regards, Otto [img:nfruqk92]https&#58;//mybergland&#46;com/fwforum/editdata&#46;jpg[/img:nfruqk92] [img:nfruqk92]https&#58;//mybergland&#46;com/fwforum/edit&#46;gif[/img:nfruqk92]
edit data
Hello friends, Now we have added a second query. If you want to edit a record, we check whether the data displayed in the browser is still up-to-date. If not, the editing process is automatically aborted, and you have to refresh the browser first. Best regards, Otto [img:f7pqtr0t]https&#58;//mybergland&#46;com/fwforum/datachanged&#46;gif[/img:f7pqtr0t]
edit value dis appears
Using xbrowse.chBrowse from resources...when I add an "on edit" clause to a column the value of the old amount returns and the new edited amount disapears. here is the codeADD COLUMN TO oBrw;SIZE 100 RIGHT PICTURE "999,999,999" ; DATA FIELDWBLOCK (eval(act1),Select("gl")) ;HEADER "Actual"+" "+cMonth ;ON EDIT { | oCol, uValue, nLastKey | If(nLastKey == 13,subtotal(1),nil) } ;COLOR CLR_WHITE, CLR_CYAN EDITABLENeed some help....
edit value dis appears
Came up with my own userdefined function and it is not pretty but works.
editable combobox and incremental search
is someone using an editable combobox with incremental search ? FWH supports incremental search on non editable comboboxes, and I am looking for a way to implement it, thanks!
editable combobox and incremental search
UNLIMITED ComboBox, Very good! [code=fw:2x01053m]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Test<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oDlg , oCombo1, oExit, oLeft, oRight, oFnt, oFont<br /><br />&nbsp; &nbsp;dbcreate<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"testdb.dbf"</span>,<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"feld1"</span>,<span style="color: #ff0000;">"C"</span>,<span style="color: #000000;">10</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;USE<br /><br />&nbsp; &nbsp;USE <span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"testdb.dbf"</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"testdb"</span> <span style="color: #00C800;">NEW</span> EXCLUSIVE<br /><br />&nbsp; &nbsp;testdb-><span style="color: #000000;">&#40;</span>dbappend<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;testdb->feld1 := replicate<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"A"</span>,len<span style="color: #000000;">&#40;</span>testdb->feld1<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;testdb-><span style="color: #000000;">&#40;</span>dbappend<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;testdb->feld1 := <span style="color: #ff0000;">"ABCDEFGHIJ"</span><br />&nbsp; &nbsp;testdb-><span style="color: #000000;">&#40;</span>dbappend<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;testdb->feld1 := replicate<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"B"</span>,len<span style="color: #000000;">&#40;</span>testdb->feld1<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;testdb-><span style="color: #000000;">&#40;</span>dbgotop<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;SetGetColorFocus<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;SkinButtons<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; <span style="color: #B900B9;">// Show...</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFnt &nbsp; <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Ms Sans Serif"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, &nbsp;<span style="color: #000000;">14</span> BOLD <span style="color: #B900B9;">//UnderLine</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont &nbsp;<span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Ms Sans Serif"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">-14</span> BOLD <span style="color: #B900B9;">//UnderLine</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Combobox CBS_DROPDOWN Search In..."</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">304</span>, <span style="color: #000000;">350</span> <span style="color: #0000ff;">PIXEL</span> COLORS CLR_BLACK, CLR_WHITE TRANSPARENT<br /><br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">lHelpIcon</span> := .F.<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">1</span>,<span style="color: #000000;">2</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Recno: "</span>+alltrim<span style="color: #000000;">&#40;</span>str<span style="color: #000000;">&#40;</span>testdb-><span style="color: #000000;">&#40;</span>recno<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">UPDATE</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span> <span style="color: #0000ff;">COMBOBOX</span> oCombo1 <span style="color: #0000ff;">VAR</span> testdb->feld1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PROMPTS</span> <span style="color: #000000;">&#123;</span> replicate<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"A"</span>,len<span style="color: #000000;">&#40;</span>testdb->feld1<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; replicate<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"B"</span>,len<span style="color: #000000;">&#40;</span>testdb->feld1<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>, <span style="color: #000000;">80</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">STYLE</span> CBS_DROPDOWN <span style="color: #0000ff;">UPDATE</span><br /><br />&nbsp; &nbsp;oCombo1:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">bKeyChar</span> = <span style="color: #000000;">&#123;</span> | nKey | oCombo1:<span style="color: #000000;">GetKeyChar</span><span style="color: #000000;">&#40;</span> nKey <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #B900B9;">// Wow...</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">3</span>,<span style="color: #000000;">2</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Type a letter for search... God save the king."</span> <span style="color: #0000ff;">UPDATE</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;COLORS CLR_HRED, CLR_WHITE<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">4</span>, <span style="color: #000000;">8</span> <span style="color: #0000ff;">BUTTON</span> oLeft <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Left"</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> testdb-><span style="color: #000000;">&#40;</span>recno<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>><span style="color: #000000;">1</span>,<span style="color: #000000;">&#40;</span>testdb-><span style="color: #000000;">&#40;</span>dbskip<span style="color: #000000;">&#40;</span><span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oDlg:<span style="color: #0000ff;">update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Begin of DB"</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oLeft:<span style="color: #000000;">cToolTip</span> := <span style="color: #ff0000;">"Use Left For Incremental Search"</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">4</span>, <span style="color: #000000;">17</span> <span style="color: #0000ff;">BUTTON</span> oRight <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Right"</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> testdb-><span style="color: #000000;">&#40;</span>recno<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><<span style="color: #000000;">3</span>,<span style="color: #000000;">&#40;</span>testdb-><span style="color: #000000;">&#40;</span>dbskip<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>, &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oDlg:<span style="color: #0000ff;">update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"End of DB"</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oRight:<span style="color: #000000;">cToolTip</span> := <span style="color: #ff0000;">"Use Right For Incremental Search"</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">6</span>,<span style="color: #000000;">1</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"1. Go with > to the second record."</span>+CRLF+ ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"2. Go with > to the third record"</span>+CRLF+ &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"3. Go with < return to the second record"</span>+CRLF+ ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"4. Open the Combobox with the arrow"</span>+CRLF+CRLF+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"Now you see, that the second record also is 'AAAAAAAAAA'"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>,<span style="color: #000000;">50</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">7.50</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">BUTTON</span> oExit <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Exit"</span> &nbsp;<span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> CANCEL <span style="color: #0000ff;">UPDATE</span><br /><br />&nbsp; &nbsp;oExit:<span style="color: #000000;">cToolTip</span> := <span style="color: #ff0000;">"Exit"</span><br /><br />&nbsp; &nbsp;SET <span style="color: #0000ff;">FONT</span> <span style="color: #0000ff;">OF</span> oLeft &nbsp;<span style="color: #0000ff;">TO</span> oFont<br />&nbsp; &nbsp;SET <span style="color: #0000ff;">FONT</span> <span style="color: #0000ff;">OF</span> oRight <span style="color: #0000ff;">TO</span> oFont<br />&nbsp; &nbsp;SET <span style="color: #0000ff;">FONT</span> <span style="color: #0000ff;">OF</span> oExit &nbsp;<span style="color: #0000ff;">TO</span> oFont<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br />&nbsp; &nbsp;oFnt:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oFont:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;USE<br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp;</div>[/code:2x01053m]
editable combobox and incremental search
[quote:2dro3bo1] oCombo1:oGet:bKeyChar = { | nKey | oCombo1:GetKeyChar( nKey ) } // Wow... [/quote:2dro3bo1] [url=http&#58;//s208&#46;photobucket&#46;com/user/fraxzi/media/FWxHarbour/combobox_error_zps3820d2c3&#46;png&#46;html:2dro3bo1][img:2dro3bo1]http&#58;//i208&#46;photobucket&#46;com/albums/bb82/fraxzi/FWxHarbour/combobox_error_zps3820d2c3&#46;png[/img:2dro3bo1][/url:2dro3bo1] I got this..
editable combobox and incremental search
Frances, It seems as your FWH version does not include that method. You need an upgraded FWH, thanks
editable combobox and incremental search
Senyor Antonio, <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> Exactly as I thought. Hehehe. I will justify. Send me price update as usual on my company email. Kind regards.
editable combobox and incremental search
done, thanks Frances! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
editable combobox con busqueda incremental
Alguien está usando un combobox editable y que soporte búsqueda incremental ? FWH soporta búsqueda incremental en comboboxes no editables, y estoy buscando la forma de implementarlo, gracias!
editable combobox con busqueda incremental
Antonio, estaria bueno implementar un xbrowse enganchado con el combobox, eso le daria una potencia increible al combo. Salu2, Ariel.
editable combobox con busqueda incremental
Ariel, Cierto, pero de momento se trata de resolver lo que explico <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
editable combobox con busqueda incremental
Algo asi Master? [url:doblxhq0]http&#58;//www&#46;elguille&#46;info/VB/utilidades/gsNotas/gsnotasv3cod2&#46;htm[/url:doblxhq0] Saludos.
editable combobox con busqueda incremental
[url:3bjymfp6]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=3&t=28456[/url:3bjymfp6] ó algo asi? [code=fw:3bjymfp6]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"FiveWin.Ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xbrowse.ch"</span><br /><br /><span style="color: #00C800;">Function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> oDlg<br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> oGet, oGet1, oCb<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cVar := space<span style="color: #000000;">&#40;</span> <span style="color: #000000;">20</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> a := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;USE customer <span style="color: #00C800;">NEW</span> <br />&nbsp; &nbsp;customer -> <span style="color: #000000;">&#40;</span> DBEVAL<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span>|| AADD<span style="color: #000000;">&#40;</span> a, field -> street <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">from</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">400</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">pixel</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;oGet := tListGet<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">new</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">15</span>,<span style="color: #000000;">15</span>,<span style="color: #000000;">&#123;</span> | u | <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> PCount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>==<span style="color: #000000;">0</span>, cVar, cVar:= u <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>,oDlg,<span style="color: #000000;">120</span>,<span style="color: #000000;">12</span>,<span style="color: #ff0000;">"@!"</span>,,,,,,,.T.<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;@ <span style="color: #000000;">29</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">get</span> oGet1 <span style="color: #0000ff;">var</span> cVar <span style="color: #0000ff;">picture</span> <span style="color: #ff0000;">"@!"</span> <span style="color: #0000ff;">size</span> <span style="color: #000000;">120</span>,<span style="color: #000000;">12</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">pixel</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">43</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">COMBOBOX</span> oCb <span style="color: #0000ff;">ITEMS</span> a <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>,<span style="color: #000000;">100</span><br /><br />&nbsp; &nbsp;oGet:<span style="color: #000000;">aSource</span> &nbsp;:= a<br />&nbsp; &nbsp;oGet:<span style="color: #000000;">bSearch</span> &nbsp;:= <span style="color: #000000;">&#123;</span>|i,e| <span style="color: #00C800;">AT</span><span style="color: #000000;">&#40;</span> i, UPPER<span style="color: #000000;">&#40;</span>e<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;oGet:<span style="color: #000000;">cSource</span> &nbsp;:= <span style="color: #ff0000;">'ARRAY'</span><br />&nbsp; &nbsp;oGet:<span style="color: #000000;">lenDisplay</span> := <span style="color: #000000;">15</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <br />&nbsp;<br />&nbsp; &nbsp;USE<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//--------------------------------------------------------------- </span><br /><br /><span style="color: #00C800;">CLASS</span> tListGet <span style="color: #0000ff;">FROM</span> tGet<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp; oBrw, oWin, aData, lenBuffer, bSearch, aSource, cSource, cField, cAlias, lenDisplay<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">new</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> CONSTRUCTOR<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">redefine</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> CONSTRUCTOR<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> FillList<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Initiate<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> keyDown<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> keychar<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">ENDCLASS</span> <br /><br /><span style="color: #B900B9;">//--------------------------------------------------------------- </span><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> nRow, nCol, bSetGet, oWnd, nWidth, nHeight, cPict, bValid,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nClrFore, nClrBack, oFont, lDesign, oCursor, lPixel, cMsg,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lUpdate, bWhen, lCenter, lRight, bChanged, lReadOnly,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lPassword, lNoBorder, nHelpId, lSpinner,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bUp, bDown, bMin, bMax, bAction, cBmpName, cVarName, cCueText <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> tListGet &nbsp;<br /><span style="color: #B900B9;">//--------------------------------------------------------------- </span><br /><br /><span style="color: #00C800;">RETURN</span> ::<span style="color: #00C800;">super</span>:<span style="color: #00C800;">new</span><span style="color: #000000;">&#40;</span> nRow, nCol, bSetGet, oWnd, nWidth, nHeight, cPict, bValid,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nClrFore, nClrBack, oFont, lDesign, oCursor, lPixel, cMsg,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lUpdate, bWhen, lCenter, lRight, bChanged, lReadOnly,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lPassword, lNoBorder, nHelpId, lSpinner,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bUp, bDown, bMin, bMax, bAction, cBmpName, cVarName, cCueText <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">//--------------------------------------------------------------- </span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">ReDefine</span><span style="color: #000000;">&#40;</span> nId, bSetGet, oWnd, nHelpId, cPict, bValid, nClrFore,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nClrBack, oFont, oCursor, cMsg, lUpdate, bWhen, bChanged,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lReadOnly, lSpinner, bUp, bDown, bMin, bMax, bAction, cBmpName,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cVarName, cCueText <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> tListGet<br /><span style="color: #B900B9;">//--------------------------------------------------------------- </span><br /><br /><span style="color: #00C800;">RETURN</span> ::<span style="color: #00C800;">super</span>:<span style="color: #0000ff;">ReDefine</span><span style="color: #000000;">&#40;</span> nId, bSetGet, oWnd, nHelpId, cPict, bValid, nClrFore,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nClrBack, oFont, oCursor, cMsg, lUpdate, bWhen, bChanged,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lReadOnly, lSpinner, bUp, bDown, bMin, bMax, bAction, cBmpName,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cVarName, cCueText <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <br /><span style="color: #B900B9;">//--------------------------------------------------------------- </span><br /><span style="color: #00C800;">METHOD</span> Initiate<span style="color: #000000;">&#40;</span> hDlg <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TListGet<br /><span style="color: #B900B9;">//--------------------------------------------------------------- </span><br /><span style="color: #00C800;">LOCAL</span> oSelf := <span style="color: #00C800;">SELF</span>, aRect<br /><br />&nbsp; &nbsp;::<span style="color: #00C800;">super</span>:<span style="color: #000000;">Initiate</span><span style="color: #000000;">&#40;</span> hDlg <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">lenBuffer</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= LEN<span style="color: #000000;">&#40;</span> cValToChar<span style="color: #000000;">&#40;</span> Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bSetGet</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">aData</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= ARRAY<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> ::<span style="color: #000000;">lenDisplay</span> := <span style="color: #000000;">5</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> ::<span style="color: #000000;">oWin</span> <span style="color: #0000ff;">OF</span> oSelf:<span style="color: #000000;">oWnd</span> <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">100</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">100</span> + ::<span style="color: #000000;">nWidth</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">STYLE</span> nOR<span style="color: #000000;">&#40;</span> WS_CHILD, WS_POPUP, WS_VISIBLE <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> ::<span style="color: #000000;">oBrw</span> <span style="color: #0000ff;">OF</span> oSelf:<span style="color: #000000;">oWin</span> ARRAY oSelf:<span style="color: #000000;">aData</span> COLUMNS <span style="color: #000000;">1</span> SIZEs ::<span style="color: #000000;">nWidth</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">lHeader</span> &nbsp; &nbsp; &nbsp; &nbsp; := .F.<br />&nbsp; &nbsp;::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">lRecordSelector</span> := .F.<br />&nbsp; &nbsp;::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">lFlatStyle</span> &nbsp; &nbsp; &nbsp;:= .T.<br />&nbsp; &nbsp;::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">nStyle</span> &nbsp; &nbsp;-= WS_BORDER<br />&nbsp; &nbsp;::<span style="color: #000000;">oWin</span>:<span style="color: #000000;">oClient</span> &nbsp; := ::<span style="color: #000000;">oBrw</span><br />&nbsp; &nbsp;::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">bChange</span> &nbsp; := <span style="color: #000000;">&#123;</span>|| ::<span style="color: #000000;">cText</span><span style="color: #000000;">&#40;</span> PADR<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aData</span><span style="color: #000000;">&#91;</span> ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">nArrayAt</span> <span style="color: #000000;">&#93;</span>, ::<span style="color: #000000;">lenBuffer</span>, <span style="color: #ff0000;">' '</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">SetPos</span><span style="color: #000000;">&#40;</span> LEN<span style="color: #000000;">&#40;</span> ALLTRIM<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aData</span><span style="color: #000000;">&#91;</span> ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">nArrayAt</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">setFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">bLClicked</span> := <span style="color: #000000;">&#123;</span>|| ::<span style="color: #000000;">oWin</span>:<span style="color: #000000;">hide</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">lHScroll</span> &nbsp;:= .F.<br />&nbsp; &nbsp;::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">lVScroll</span> &nbsp;:= .F.<br />&nbsp; &nbsp;::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">createFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; <br />&nbsp; &nbsp;::<span style="color: #000000;">bPostKey</span> &nbsp; &nbsp; := <span style="color: #000000;">&#123;</span>|oGet, cBuffer| ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> EMPTY<span style="color: #000000;">&#40;</span> cBuffer <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">oWin</span>:<span style="color: #000000;">hide</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">NIL</span> &nbsp;<span style="color: #000000;">&#41;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oGet:<span style="color: #000000;">aData</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> := cBuffer, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oGet:<span style="color: #000000;">Assign</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">FillList</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oSelf:<span style="color: #000000;">oWin</span> <span style="color: #0000ff;">NOWAIT</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oSelf:<span style="color: #000000;">oWin</span>:<span style="color: #000000;">hide</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">bMoved</span> := <span style="color: #000000;">&#123;</span>|| ::<span style="color: #000000;">oWin</span>:<span style="color: #000000;">hide</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//--------------------------------------------------------------- </span><br /><span style="color: #00C800;">METHOD</span> FillList<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TListGet<br /><span style="color: #B900B9;">//--------------------------------------------------------------- </span><br /><span style="color: #00C800;">LOCAL</span> i := <span style="color: #000000;">1</span>, aRect<br /><br />&nbsp; &nbsp; &nbsp; &nbsp;ASIZE<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aData</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">DO</span> <span style="color: #00C800;">CASE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">CASE</span> ::<span style="color: #000000;">cSource</span> = <span style="color: #ff0000;">'ARRAY'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> &nbsp;LEN<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aData</span> <span style="color: #000000;">&#41;</span> < ::<span style="color: #000000;">lenDisplay</span> .AND. i <= LEN<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSource</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> EVAL<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bSearch</span>, ALLTRIM<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">aData</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">aSource</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AADD<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aData</span>, ::<span style="color: #000000;">aSource</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; i++<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ENDDO</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">oWin</span>:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oWin</span>:<span style="color: #000000;">nWidth</span>, <span style="color: #000000;">&#40;</span> LEN<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aData</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> * GetTextHeight<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span> + LEN<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aData</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aRect := getWndRect<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">oWin</span>:<span style="color: #0000ff;">move</span><span style="color: #000000;">&#40;</span> aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> + ::<span style="color: #000000;">nHeight</span> + <span style="color: #000000;">3</span>, aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">oWin</span>:<span style="color: #000000;">show</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">CASE</span> ::<span style="color: #000000;">cSource</span> = <span style="color: #ff0000;">'DBF'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cAlias</span><span style="color: #000000;">&#41;</span> -> <span style="color: #000000;">&#40;</span> DBGOTOP<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> &nbsp;LEN<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aData</span> <span style="color: #000000;">&#41;</span> < ::<span style="color: #000000;">lenDisplay</span> .AND. ! <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cAlias</span><span style="color: #000000;">&#41;</span>-> <span style="color: #000000;">&#40;</span> EOF<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> EVAL<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bSearch</span>, ALLTRIM<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">aData</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cAlias</span><span style="color: #000000;">&#41;</span>-> <span style="color: #000000;">&#40;</span> fieldGet<span style="color: #000000;">&#40;</span> fieldPos<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cField</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AADD<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aData</span>, <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cAlias</span><span style="color: #000000;">&#41;</span>-> <span style="color: #000000;">&#40;</span> fieldGet<span style="color: #000000;">&#40;</span> fieldPos<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cField</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; i++<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ENDDO</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ENDCASE</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">oBrw</span>:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">//--------------------------------------------------------------- </span><br /><span style="color: #00C800;">METHOD</span> KeyDown<span style="color: #000000;">&#40;</span> nKey, nFlags <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TListGet<br /><span style="color: #B900B9;">//--------------------------------------------------------------- </span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">oWin</span>:<span style="color: #000000;">lVisible</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">DO</span> <span style="color: #00C800;">CASE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">CASE</span> nKey == VK_UP<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">GoUp</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">CASE</span> nKey == VK_DOWN<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">GoDown</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDCASE</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> nKey == VK_DELETE .or. nKey == VK_BACK<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Super</span>:<span style="color: #000000;">KeyDown</span><span style="color: #000000;">&#40;</span> nKey, nFlags <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">aData</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> := ::<span style="color: #000000;">cText</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> EMPTY<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aData</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">oWin</span>:<span style="color: #000000;">hide</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">FillList</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #000000;">0</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span> &nbsp; <br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">Super</span>:<span style="color: #000000;">KeyDown</span><span style="color: #000000;">&#40;</span> nKey, nFlags <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//--------------------------------------------------------------- </span><br /><span style="color: #00C800;">METHOD</span> keychar<span style="color: #000000;">&#40;</span> nKey, nFlags <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TListGet<br /><span style="color: #B900B9;">//--------------------------------------------------------------- </span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> nKey == VK_RETURN .AND. ::<span style="color: #000000;">oWin</span>:<span style="color: #000000;">lVisible</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oWin</span>:<span style="color: #000000;">hide</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">super</span>:<span style="color: #000000;">keychar</span><span style="color: #000000;">&#40;</span> nkey, nFlags <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:3bjymfp6]
editable combobox con busqueda incremental
João, La idea es usar un combobox dropdown list estandard. Lo primero que he intentado ha sido esto: [code=fw:btt5y4sy]<div class="fw" id="{CB}" style="font-family: monospace;">oCbx:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">bKeyChar</span> = <span style="color: #000000;">&#123;</span> | nKey, nFlags | oCbx:<span style="color: #000000;">KeyChar</span><span style="color: #000000;">&#40;</span> nKey, nFlags <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span></div>[/code:btt5y4sy] Pero nose comportaba como necesito. Luego asi: [code=fw:btt5y4sy]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; oCbx:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">bKeyChar</span> = <span style="color: #000000;">&#123;</span> | nKey, nFlags, nAt | ;<br />&nbsp; &nbsp;&nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> nAt := AScan<span style="color: #000000;">&#40;</span> oCbx:<span style="color: #000000;">aItems</span>, AllTrim<span style="color: #000000;">&#40;</span> oCbx:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">GetText</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> != <span style="color: #000000;">0</span>,;<br />&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#40;</span> oCbx:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> oCbx:<span style="color: #000000;">aItems</span><span style="color: #000000;">&#91;</span> nAt <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span></div>[/code:btt5y4sy] Pero nada aún <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
editable combobox con busqueda incremental
Talbéz: [url:pxuz7twn]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?p=143534[/url:pxuz7twn] salu2
editable combobox con busqueda incremental
Joao, Solucionado <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> oCbx:oGet:bKeyChar = { | nKey | oCbx:GetKeyChar( nKey ) } gracias!
editable combobox con busqueda incremental
Hola Antonio, tienes un ejemplo de como funciona ? gracias saludos..
editable combobox con busqueda incremental
César, [code=fw:25buarom]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oDlg, oCbx, cDia<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br />   @ <span style="color: #000000;">1</span>, <span style="color: #000000;">3</span> <span style="color: #0000ff;">COMBOBOX</span> oCbx <span style="color: #0000ff;">VAR</span> cDia <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">300</span> ;<br />      <span style="color: #0000ff;">ITEMS</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Lunes"</span>, <span style="color: #ff0000;">"Martes"</span>, <span style="color: #ff0000;">"Miércoles"</span>, <span style="color: #ff0000;">"Jueves"</span>, <span style="color: #ff0000;">"Viernes"</span>, <span style="color: #ff0000;">"Sábado"</span>, <span style="color: #ff0000;">"Domingo"</span> <span style="color: #000000;">&#125;</span> ;<br />      <span style="color: #0000ff;">STYLE</span> CBS_DROPDOWN<br /><br />   oCbx:<span style="color: #000000;">oGet</span>:<span style="color: #000000;">bKeyChar</span> = <span style="color: #000000;">&#123;</span> | nKey | oCbx:<span style="color: #000000;">GetKeyChar</span><span style="color: #000000;">&#40;</span> nKey <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:25buarom]