topic
stringlengths
1
63
text
stringlengths
1
577k
xBrowse - ToolTip em BOTÃO
Karinha, gostaria do TOOLTIP apenas no botão da coluna, não na coluna entende. obrigado de qualquer forma
xBrowse - ToolTip em BOTÃO
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=34818">viewtopic.php?f=6&t=34818</a><!-- l -->
xBrowse - ToolTip em BOTÃO
This code [code=fw:3sp7jqp2]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp;oBrw:<span style="color: #000000;">bToolTips</span> := <span style="color: #000000;">&#123;</span> | oBrw,r,c,f,oMouseCol,nMouseRow| MyColToolTip<span style="color: #000000;">&#40;</span> oBrw,r,c,f,oMouseCol,nMouseRow <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:3sp7jqp2] can be replaced with: [code=fw:3sp7jqp2]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">bCellToolTips</span> := <span style="color: #000000;">&#123;</span> |o| cValToChar<span style="color: #000000;">&#40;</span> o:<span style="color: #000000;">Value</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span></div>[/code:3sp7jqp2] and you can remove the function MyColToolTip.
xBrowse - Tooltip
Gente: Tengo el siguiente browse [img:1fcfevyk]http&#58;//imageshack&#46;com/scaled/medium/401/fd14&#46;jpg[/img:1fcfevyk] El acceso, mediante boton de la columna Banco, abre otro Browse para selección. Devuelve un array con código y descripción, el código se visualiza la lado del boton (como se ve arriba). Hasta aquí todo correcto. La pregunta es; si puedo definir un Tooltip, de manera que me muestre la descripción referida a tal codigo A modo de ejemplo lo hago así (sin exito) [code=fw:1fcfevyk]<div class="fw" id="{CB}" style="font-family: monospace;">   WITH OBJECT oLstChq<br />      ...<br />      :<span style="color: #000000;">bChange</span>     := <span style="color: #000000;">&#123;</span>|| oLstChq:<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, nPosActual := oLstChq:<span style="color: #000000;">BookMark</span>, ;<br />                          oLstChq:<span style="color: #000000;">Banco</span>:<span style="color: #000000;">cToolTip</span>:= aBanco<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>, oLstChq:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />   END<br />   ...<br />   WITH OBJECT oLstChq:<span style="color: #000000;">Banco</span><br />      :<span style="color: #000000;">nHeadStrAlign</span>:= :<span style="color: #000000;">nDataStrAlign</span>:= AL_RIGHT<br />      :<span style="color: #000000;">cEditPicture</span> := PIC_DIEZCIF0<br />      :<span style="color: #000000;">nEditType</span>    := EDIT_BUTTON<br />      :<span style="color: #000000;">AddResource</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"bmp_Banco"</span> <span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">nBtnBmp</span>      := <span style="color: #000000;">1</span><br /><br />      :<span style="color: #000000;">bstrData</span>  := <span style="color: #000000;">&#123;</span>|| aBanco<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span><br />      :<span style="color: #000000;">bEditBlock</span>:= <span style="color: #000000;">&#123;</span>|| aBanco:= <span style="color: #000000;">&#40;</span>h0<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"Bancos"</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cAlias</span><span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> oCaptu:<span style="color: #000000;">Capturas</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"FBank01"</span>, <span style="color: #ff0000;">"FBank02"</span>, _ARBANCOS, <span style="color: #ff0000;">"Bancos"</span>, <span style="color: #00C800;">TRUE</span>, <span style="color: #00C800;">FALSE</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, ;<br />                        saChqCobros<span style="color: #000000;">&#91;</span>oLstChq:<span style="color: #000000;">nArrayAt</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>_IDBanco<span style="color: #000000;">&#93;</span>:= aBanco<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>, ;<br />                        oLstChq:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />   END<br /> </div>[/code:1fcfevyk] Se puede?
xBrowse - Tooltip
Mario, creo que esto puede llegar a darte una idea de como hacerlo. El FW Samples\TestxBr3.prg tiene una función ShowFunction() que adaptándola te puede llegar a servir. No tengo una PC a mano para probar pero fijate. Un gran brazo amigo. Miguel
xBrowse - Tooltip
A ver Marito si esto te sirve. Tomado de ejemplos de FH (XbRowEd.Prg y TestxBr3.prg chusmeando los prg se puede llegar a encontrar cada joyita .... Grande ANTONIO !!!) con algunas modificaciones. Hay que pulir un poco el código, (lo hice medio a las disparadas) pero te puede dar una idea. [code=fw:177fwpz2]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">/*<br />*<br />* XbRowEd.Prg<br />*<br />* Using oBrw:CurrentRow() object for popup edits<br />*<br />*/</span><br /><br /><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;">'adodef.ch'</span>  <span style="color: #B900B9;">// in \fwh\include folder</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'ord.ch'</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'xbrowse.ch'</span><br /><br />REQUEST DBFCDX<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> oBrw, oDlg, uData<br />   <span style="color: #00C800;">local</span> oFont<br /><br />   SET EXCLUSIVE OFF<br />   SET DELETED <span style="color: #0000ff;">ON</span><br />   SET OPTIMIZE <span style="color: #0000ff;">ON</span><br /><br />   SetGetColorFocus<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   USE CUSTOMER <span style="color: #00C800;">NEW</span> <span style="color: #0000ff;">ALIAS</span> CUST SHARED VIA <span style="color: #ff0000;">'DBFCDX'</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;">-12</span><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">640</span>,<span style="color: #000000;">460</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">'XBrowse Row Edit'</span> ;<br />                      <span style="color: #0000ff;">FONT</span> oFont<br /><br />   @ <span style="color: #000000;">10</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-10</span>,<span style="color: #000000;">-30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />      COLUMNS <span style="color: #ff0000;">'First'</span>, <span style="color: #ff0000;">'City'</span>, <span style="color: #ff0000;">'Age'</span>, <span style="color: #ff0000;">'Salary'</span> ;<br />      PICTURES <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, <span style="color: #ff0000;">'999'</span>, <span style="color: #ff0000;">'99,999,999.99'</span> ;<br />      OBJECT uData ;<br />      AUTOSORT CELL LINES NOBORDER ;<br />      <span style="color: #0000ff;">ON</span> DBLCLICK RowEdit<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">CurrentRow</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   WITH OBJECT oBrw<br />      :<span style="color: #000000;">nStretchCol</span>  := STRETCHCOL_WIDEST<br />      :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   END<br /><br />   @ <span style="color: #000000;">210</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">'Edit'</span>  <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>,<span style="color: #000000;">14</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> RowEdit<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">CurrentRow</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   @ <span style="color: #000000;">210</span>,<span style="color: #000000;">270</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">'Close'</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>,<span style="color: #000000;">14</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 />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br />   <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br />   DbCloseAll<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: #00C800;">static</span> <span style="color: #00C800;">function</span> RowEdit<span style="color: #000000;">&#40;</span> oRow <span style="color: #000000;">&#41;</span><br /><br /><br />   <span style="color: #00C800;">local</span> nFrom, nUpto<br />   <span style="color: #00C800;">Local</span> cText := oRow:<span style="color: #000000;">First</span> +CRLF+ <span style="color: #ff0000;">"__________________________________________"</span>+CRLF+CRLF+  ; <br />                                    <span style="color: #ff0000;">"Todo el text que quieras poner"</span> +CRLF+ <span style="color: #ff0000;">"Ya de forma estatica, como robada desde una .DBF"</span> +CRLF+ ;<br />                                    <span style="color: #ff0000;">"y .... bla, bla, bla, bla, bla, bla, bla..."</span> +CRLF+ ;<br />                                    <span style="color: #ff0000;">"y .... bla, bla, bla, bla, bla, bla, bla..."</span> +CRLF+ ;<br />                                    <span style="color: #ff0000;">"y .... bla, bla, bla, bla, bla, bla, bla..."</span> +CRLF+ ;<br />                                    <span style="color: #ff0000;">"y .... bla, bla, bla, bla, bla, bla, bla..."</span> +CRLF+ ;<br />                                    <span style="color: #ff0000;">"y .... bla, bla, bla, bla, bla, bla, bla..."</span><br />  <br /><br />   nUpto := <span style="color: #00C800;">At</span><span style="color: #000000;">&#40;</span> CRLF + <span style="color: #ff0000;">"return"</span>, Lower<span style="color: #000000;">&#40;</span> cText <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">if</span> nUpto > <span style="color: #000000;">0</span><br />      cText := <span style="color: #0000ff;">Left</span><span style="color: #000000;">&#40;</span> cText, nUpto + <span style="color: #000000;">11</span> <span style="color: #000000;">&#41;</span><br />      cText := StrTran<span style="color: #000000;">&#40;</span> cText, CRLF + <span style="color: #ff0000;">"   cFunc := ProcName( 0 )"</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">if</span> !Empty<span style="color: #000000;">&#40;</span> cText <span style="color: #000000;">&#41;</span><br />      HTMLPOP<span style="color: #000000;">&#40;</span> GetActiveWindow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">nil</span>, 0x000E, cText <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:177fwpz2] Abrazos Marito y que el Abuelo te proteja. Miguel
xBrowse - Tooltip
Miguelito querido! Muchas gracias. Muy bueno el Tip Lo estoy estudiando a ver si se puede adaptar Hay que "inventar" una reunión! <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) -->
xBrowse - Tooltip
2do. ejemplo un poco mas sofisticado [code=fw:baino550]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">/*<br />*<br />* XbRowEd.Prg<br />*<br />* Using oBrw:CurrentRow() object for popup edits<br />*<br />*/</span><br /><br /><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;">'adodef.ch'</span> &nbsp;<span style="color: #B900B9;">// in \fwh\include folder</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'ord.ch'</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'xbrowse.ch'</span><br /><br />REQUEST DBFCDX<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> oBrw, oDlg, uData<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oFont<br /><br />&nbsp; &nbsp;SET EXCLUSIVE OFF<br />&nbsp; &nbsp;SET DELETED <span style="color: #0000ff;">ON</span><br />&nbsp; &nbsp;SET OPTIMIZE <span style="color: #0000ff;">ON</span><br /><br />&nbsp; &nbsp;SetGetColorFocus<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;USE CUSTOMER <span style="color: #00C800;">NEW</span> <span style="color: #0000ff;">ALIAS</span> CUST SHARED VIA <span style="color: #ff0000;">'DBFCDX'</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;">-12</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;">640</span>,<span style="color: #000000;">460</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">'XBrowse Row Edit'</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">FONT</span> oFont<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">10</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-10</span>,<span style="color: #000000;">-30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; COLUMNS <span style="color: #ff0000;">'First'</span>, <span style="color: #ff0000;">'City'</span>, <span style="color: #ff0000;">'Age'</span>, <span style="color: #ff0000;">'Salary'</span> ;<br />&nbsp; &nbsp; &nbsp; PICTURES <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, <span style="color: #ff0000;">'999'</span>, <span style="color: #ff0000;">'99,999,999.99'</span> ;<br />&nbsp; &nbsp; &nbsp; OBJECT uData ;<br />&nbsp; &nbsp; &nbsp; AUTOSORT CELL LINES NOBORDER ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> DBLCLICK RowEdit<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">CurrentRow</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;WITH OBJECT oBrw<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nStretchCol</span> &nbsp;:= STRETCHCOL_WIDEST<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;END<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">210</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">'Edit'</span> &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>,<span style="color: #000000;">14</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> RowEdit<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">CurrentRow</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">210</span>,<span style="color: #000000;">270</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">'Close'</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>,<span style="color: #000000;">14</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;<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 />&nbsp; &nbsp;DbCloseAll<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: #00C800;">static</span> <span style="color: #00C800;">function</span> RowEdit<span style="color: #000000;">&#40;</span> oRow <span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> nFrom, nUpto<br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> A<br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> cText := oRow:<span style="color: #000000;">First</span> +CRLF+ <span style="color: #ff0000;">"__________________________________________"</span>+CRLF<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">For</span> A:= <span style="color: #000000;">1</span> <span style="color: #0000ff;">To</span> Len<span style="color: #000000;">&#40;</span>oRow:<span style="color: #000000;">aHeaders</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cText+= &nbsp;+CRLF+ oRow:<span style="color: #000000;">aHeaders</span><span style="color: #000000;">&#91;</span>A<span style="color: #000000;">&#93;</span> +<span style="color: #ff0000;">" : "</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Do</span> <span style="color: #00C800;">Case</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">Case</span> ValType<span style="color: #000000;">&#40;</span>oRow:<span style="color: #000000;">aValues</span><span style="color: #000000;">&#91;</span>A<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"C"</span> ; cText+= + oRow:<span style="color: #000000;">aValues</span><span style="color: #000000;">&#91;</span>A<span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">Case</span> ValType<span style="color: #000000;">&#40;</span>oRow:<span style="color: #000000;">aValues</span><span style="color: #000000;">&#91;</span>A<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"N"</span> ; cText+= + Str<span style="color: #000000;">&#40;</span>oRow:<span style="color: #000000;">aValues</span><span style="color: #000000;">&#91;</span>A<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">Case</span> ValType<span style="color: #000000;">&#40;</span>oRow:<span style="color: #000000;">aValues</span><span style="color: #000000;">&#91;</span>A<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"L"</span> ; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span>oRow:<span style="color: #000000;">aValues</span><span style="color: #000000;">&#91;</span>A<span style="color: #000000;">&#93;</span> , cText+= + <span style="color: #ff0000;">"CASADO"</span> , cText+= + <span style="color: #ff0000;">"CASADO"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">Case</span> ValType<span style="color: #000000;">&#40;</span>oRow:<span style="color: #000000;">aValues</span><span style="color: #000000;">&#91;</span>A<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"D"</span> ; cText+= + DtoC<span style="color: #000000;">&#40;</span>oRow:<span style="color: #000000;">aValues</span><span style="color: #000000;">&#91;</span>A<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Endcase</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cText+= +CRLF+ <span style="color: #ff0000;">"__________________________________________"</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Next</span> A<br /><br />&nbsp; &nbsp;nUpto := <span style="color: #00C800;">At</span><span style="color: #000000;">&#40;</span> CRLF + <span style="color: #ff0000;">"return"</span>, Lower<span style="color: #000000;">&#40;</span> cText <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> nUpto > <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; cText := <span style="color: #0000ff;">Left</span><span style="color: #000000;">&#40;</span> cText, nUpto + <span style="color: #000000;">11</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; cText := StrTran<span style="color: #000000;">&#40;</span> cText, CRLF + <span style="color: #ff0000;">" &nbsp; cFunc := ProcName( 0 )"</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> !Empty<span style="color: #000000;">&#40;</span> cText <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; HTMLPOP<span style="color: #000000;">&#40;</span> GetActiveWindow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">nil</span>, 0x000E, cText <span style="color: #000000;">&#41;</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 />&nbsp;</div>[/code:baino550] Besos y abrazos !!!
xBrowse - Tooltip
Miguel; Muchas gracias por tu tiempo! Interesante la función. Ahora bien, en mi pretensión, la idea es que funcione como un Tooltip (el que por lo que observo, no funciona al señalar una celda, sino que lo hace sobre la cabecera). O sea, la idea es que al señalar un "celda" que contiene un código, muestre su descripción...peeeero, sin tener que pulsar sobre un boton externo al browse. Quizás es un poco loco... pero bue, ocurrencias dada la potencia de xbrowse. Feliz Navidad y finde!!! (para todos)
xBrowse - Tooltip
Mario, Yo lo tengo implementado, asi como dices tu, un tooltip que devuelve un texto variable sobre las lineas de cuerpo del browse, pero para la clase TSBrowse(). Mi clase TSBrowse(), literalmente, "da miedo" por la cantidad de cambios y hackings que tiene. Basicamente, como lo tengo, es interviniendo el metodo :MouseMove() donde se llama al metodo (padre) :ShowToolTip(). Es necesario una Data tipo codeblock por cada objeto oCol que tenga la descripcion a mostrar. El codeblock deberia recibir como parametro el dato de la celda, o incluso el registro actual, para dbfs. Como guinda del pastel, el globo que aparece, muestra como titulo la cabecera de la columna, en negrita y debajo el texto segun el dato que hay debajo del puntero del mouse. Feliz Navidad para todos ! <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
xBrowse - Tooltip
[quote="MarioG":cnst4fyy]Miguel; Muchas gracias por tu tiempo! Interesante la función. Ahora bien, en mi pretensión, la idea es que funcione como un Tooltip (el que por lo que observo, no funciona al señalar una celda, sino que lo hace sobre la cabecera). O sea, la idea es que al señalar un "celda" que contiene un código, muestre su descripción...peeeero, sin tener que pulsar sobre un boton externo al browse. Quizás es un poco loco... pero bue, ocurrencias dada la potencia de xbrowse. Feliz Navidad y finde!!! (para todos)[/quote:cnst4fyy] Mario no solo te trae la información de los Head si no también el contenido de los campos, además no hace falta pulsar el botón, con solo cliclear sobre una celda te trae la información del registro. En el primer ejemplo hace exactamente eso. En cuanto a la información que te muestra esa la podes manejar a tu antojo. La idea en si es que veas la posibilidades que da la función en si, las posibilidades son enormes. Otra ventaja que le veo sobre el tooltip, es que permanece el hasta que le realices un nuevo click. Bueno era solo una idea. Abrazos. Miguel
xBrowse - Tooltip
Hola Creo que la clase TXBrwColumn de XBrowse tiene una DATA bToolTip Este es el código que aparece con los parámetros que son pasados al codeblock [code=fw:3mynx6vv]<div class="fw" id="{CB}" style="font-family: monospace;"><br />cTxt := eval<span style="color: #000000;">&#40;</span> oCol:<span style="color: #000000;">bToolTip</span>, <span style="color: #00C800;">Self</span>, nRow, nCol, nkeyFlags <span style="color: #000000;">&#41;</span><br /> </div>[/code:3mynx6vv]
xBrowse - Tooltip
Rolando, gracias! Lo uso en botones... pero estoy contra reloj... asi es que quedará como tarea pendiente
xBrowse - Tooltip
hmpaquito. Muchas gracias por tu interés Miguel: Que torpe!. No miré la declaración de DBLCLIC en el XBROWSE CNavarro: gracias!. Lo estoy probando
xBrowse - Tooltip
Mario, si le agregas a [code=fw:2zr3gpbc]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> CreateButtons<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TXBrwColumn<br /><br />...<br /><br />@ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">BTNBMP</span> ::<span style="color: #000000;">oBtnElip</span> <span style="color: #0000ff;">OF</span> ::<span style="color: #000000;">oBrw</span> NOBORDER <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><br />::<span style="color: #000000;">oBtnElip</span>:<span style="color: #000000;">cCaption</span> := IfNil<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cBtnCaption</span>, <span style="color: #ff0000;">"..."</span> <span style="color: #000000;">&#41;</span><br />::<span style="color: #000000;">oBtnElip</span>:<span style="color: #000000;">bAction</span> := <span style="color: #000000;">&#123;</span>|| ::<span style="color: #000000;">RunBtnAction</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />::<span style="color: #000000;">oBtnElip</span>:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ValType<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oDataFont</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"B"</span>, Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oDataFont</span>, <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">oDataFont</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />::<span style="color: #000000;">oBtnElip</span>:<span style="color: #000000;">SetColor</span><span style="color: #000000;">&#40;</span> aColors<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, aColors<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 /><br />::<span style="color: #000000;">oBtnElip</span>:<span style="color: #000000;">cTooltip</span>:=<span style="color: #ff0000;">"prueba"</span> &nbsp; <span style="color: #B900B9;">// agregado</span><br /><br />...</div>[/code:2zr3gpbc] Al pasar sobre un boton sale el tooltip "prueba" A partir de esto supongo podrías reformar la clase para que haga lo que pretendes (agregandole datas, etc.) Saludos Rolando
xBrowse - Totales en footers
Antonio: Si fuera posible hacer los footers el xBrowse con la posibilidad de colocar totales de las columnas. Saludos y Gracias Ruben Fernandez
xBrowse - bSeek Ayuda
Amigos:Necesito un ejemplo de un xBrowse que al digitarun nombre se mueva el browse hasta el nombre ese que se digitaMuchas gracias.(Disculpen, me estoy cambiando de Browse)Saludos y GraciasRuben Fernandez
xBrowse - bSeek Ayuda
Hola Rubén:A ver si es esto lo que estás buscando:[code:16oc8sed] &#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46; REDEFINE GET oGet VAR cText ID 801 PICTURE "@!" OF oDlg; ON CHANGE &#40; Self&#58;Assign&#40;&#41;,; Locator&#40;""+SubStr&#40;cText,1,Self&#58;nPos-1&#41;+Upper&#40;Chr&#40; nKey &#41;&#41;,oLbx,cUsaBase&#41; &#41;; &#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46; ************************************ FUNCTION LOCATOR&#40;cKey,oB,cUsaBase&#41; ************************************ // oB = TWBrowse Object, cKey = Contenido del Get local nSeekrec // nSeekrec&#58;=&#40;cUsaBase&#41;->&#40;Recno&#40;&#41;&#41; cKey &#58;= SubStr&#40;cKey,1,Len&#40;cKey&#41;-1&#41; // IF GetASyncKey&#40; VK_BACK &#41; cKey &#58;= SubStr&#40;cKey,1,Len&#40;cKey&#41;-1&#41; EndIF &#40;cUsaBase&#41;->&#40;DbSeek&#40;cKey,&#46;T&#46;&#41;&#41; If !Found&#40;&#41; GO nSeekrec EndIF // oB&#58;Refresh&#40;&#41; // RETURN&#40; NIL &#41; [/code:16oc8sed]
xBrowse - bSeek Ayuda
Gracias Manuel:Lo pruebo y te aviso.Gracias y SaludosRuben Fernandez.
xBrowse - bSeek Ayuda
Manuel:Funciono perfecto, ahora deseo enmcontrar la funcion similar del twBrowse de HDC para xBrowse. No necesita tener un get,solo digitar lo que buscas.Muchas gracias, por ahora esta solucionadoSaludosRuben Fernandez.
xBrowse - bSeek Ayuda
Usando bkeydown podrías conseguirlo. La siguiente función te desplaza el browse según la letra que digitas. Con algunas modificaciones creo que te servirá para implementar lo que buscas.[code:1o6mjq7u] &#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46; oLbx&#58;bkeydown&#58;=&#123;|nKey|DOKEYCHECK&#40;nKey,oLbx&#41;&#125; &#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46; ****************************************************************** FUNCTION DOKEYCHECK&#40;nKey,oBrw&#41; ****************************************************************** *------SINGLE CHARACTER BROWSE SEARCHER---------------------- local cKEY, nSeekrec nSeekrec&#58;=recno&#40;&#41; && Record number before the seek&#46;&#46;&#46; && Note ASCII values&#58; 65-90 are Capital A through Z&#46; && &#58; 97-122 are lowercase a through z&#46; && &#58; 48-57 are numbers 0-9&#46; && &#58; 13 used below is for a RETURN key hit&#46; IF nKEY>=65 &#46;AND&#46; nKEY<=90 &#46;OR&#46; nKEY>=97 &#46;AND&#46; nKEY<=122 &#46;OR&#46; nKEY >=48 &#46;AND&#46; nKEY<=57 cKey&#58;=UPPER&#40;CHR&#40;nKEY&#41;&#41; && Change ACSII nKey value to a Character value && for the SEEK&#46;&#46;&#46; SET SOFTSEEK ON && Get as close as you can to the key value&#46;&#46;&#46; SEEK UPPER&#40;cKey&#41; SET SOFTSEEK OFF && Reset softseek oBRW&#58;oVscroll&#58;setpos&#40;recno&#40;&#41;&#41; && Refresh browser object sequence&#46;&#46;&#46; oBRW&#58;refresh&#40;&#41; && SysRefresh&#40;&#41; RETURN&#40; NIL &#41; && Drop out! ENDIF *-RECORD SELECTION AFTER A RETURN KEY HIT&#46;&#46;&#46;POSSIBLY TO DROP TO EDIT WINDOW -* DO CASE CASE nKEY == VK_SPACE // CASE nKEY == VK_RETURN // ENDCASE // RETURN&#40; NIL &#41; [/code:1o6mjq7u]
xBrowse - bSeek Ayuda
Manuel:Espectacular, muchas gracias.SaludosRuben Fernandez
xBrowse - bSeek Ayuda
Lo que te comenta Manuel esta bien y seguro que funciona, pero para xBrowse lo ideal sería emplear sus Datas y metodos que proporciona para busquedas.Lo primero crear un objeto say, que irá visualizando la cadena de busqueda.Una vez creado el say, añades las siugientes lineas, y ya tienes la busqueda implementada.[code:z1f4myab] oBrw&#58;bSeek &#58;= &#123; | c | Alias->&#40;DBSeek&#40; c &#41;, &#46;T&#46; &#41; &#125; //el alias que quieras oBrw&#58;oSeek &#58;= oSay //El say que has creado antes, no es obligatorio [/code:z1f4myab]
xBrowse - bSeek Ayuda
Muchas gracias Biel. Va uno heredando código antiguo, que aunque funciona, no es lo mejor.
xBrowse - bSeek Ayuda
Gracias Biel.SaludosRuben Fernandez.
xBrowse - beditblock (RESOLVIDO)
Para validar eu pego o valor do GET ASSIM: obRW:aCols[4]:bEditValid := {|oGet| validget(oGet)} E para avaliar code block get_button corrente: ex: obRW:aCols[6]:nEditType := EDIT_GET_BUTTON obRW:aCols[6]:bEditBlock := {|oget ??? | validget(oget) } Como fazer? Grato
xBrowse - beditblock (RESOLVIDO)
O pessoal, preciso de um help... Como eu chamo uma função com a beditblock e carrego o get corrente com o valor retornado, já forçando um enter para validar o campo... Heeeeeeeeelp Grato
xBrowse - beditblock (RESOLVIDO)
RESOLVIDO
xBrowse - bmp en columna (SOLUCIONADO)
Amigos, FELIZ 2015 y sobre todo muuuucho codigo (vendido! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->) Intento mostrar en un xbrowse de campos de dbf, una columna con un bmp, bajo condición de seleccion Se que puedo hacerlo con un campo verdadero/falso, pero mi por razones de DBF compartida, intento otra opción. El codigo del xBrowse es: [code=fw:3en22bec]<div class="fw" id="{CB}" style="font-family: monospace;">   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oLstChq <span style="color: #0000ff;">ID</span> BRW_XBRW <span style="color: #0000ff;">OF</span> oDlg ;<br />            COLUMNS <span style="color: #ff0000;">"FDETCHQ02"</span>, <span style="color: #ff0000;">"FDETCHQ04"</span>, <span style="color: #ff0000;">"FDETCHQ05"</span>, <span style="color: #00C800;">nil</span>   ;<br />            HEADERS <span style="color: #ff0000;">"DocNro"</span>,    <span style="color: #ff0000;">"FeVencim"</span>,  <span style="color: #ff0000;">"Monto"</span>, <span style="color: #ff0000;">"Check"</span> ;<br />            <span style="color: #0000ff;">ALIAS</span>   h0<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"DetaCheq32"</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cAlias</span><br /> </div>[/code:3en22bec] Sin manipular la columna Check, muestra nil, o sea no da error. Para definir la selección utilizo un Hash [code=fw:3en22bec]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> HHasKey<span style="color: #000000;">&#40;</span> hSelect, h0<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"DetaCheq32"</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">RecNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, HDel<span style="color: #000000;">&#40;</span> hSelect, h0<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"DetaCheq32"</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Recno</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, ;<br />                                                HSet<span style="color: #000000;">&#40;</span> hSelect, h0<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"DetaCheq32"</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Recno</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, h0<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"DetaCheq32"</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Recno</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>, ;<br /> </div>[/code:3en22bec] O sea que la idea sería: [code=fw:3en22bec]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> HHasKey<span style="color: #000000;">&#40;</span> hSelect, h0<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"DetaCheq32"</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">RecNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"bmp"</span>, <span style="color: #ff0000;">""</span><span style="color: #000000;">&#41;</span></div>[/code:3en22bec] Mirando samples, estoy intentando definir la columna, mediante: [code=fw:3en22bec]<div class="fw" id="{CB}" style="font-family: monospace;">   WITH OBJECT oLstChq:<span style="color: #000000;">Check</span><br />      :<span style="color: #000000;">nEditType</span>       := TYPE_IMAGE<br />      :<span style="color: #000000;">lBmpStretch</span>     := .f.<br />      :<span style="color: #000000;">lBmpTransparent</span> := .t.<br />      :<span style="color: #000000;">AddResource</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"bmp_Ok2"</span> <span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">cHeader</span>      := <span style="color: #ff0000;">""</span><br />      :<span style="color: #000000;">nHeadBmpAlign</span>:= :<span style="color: #000000;">nDataBmpAlign</span>:= AL_CENTER<br />      :<span style="color: #000000;">nHeadBmpNo</span>   := <span style="color: #000000;">1</span><br /><br />      :<span style="color: #000000;">bStrImage</span>       := <span style="color: #000000;">&#123;</span>|| <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> HHasKey<span style="color: #000000;">&#40;</span> shSelect, h0<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"DetaCheq32"</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">RecNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"bmp_Ok2"</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#41;</span>  <span style="color: #000000;">&#125;</span><br />   END<br /> </div>[/code:3en22bec] pero evidentemente no es la forma. Se puede?, como?
xBrowse - bmp en columna (SOLUCIONADO)
This is another alternative: [code=fw:3h01cel0]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">local</span> oDlg, nAt, aSelected := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span> <br /><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oLstChq <span style="color: #0000ff;">ID</span> BRW_XBRW <span style="color: #0000ff;">OF</span> oDlg ;<br />         COLUMNS <span style="color: #ff0000;">"FDETCHQ02"</span>, <span style="color: #ff0000;">"FDETCHQ04"</span>, <span style="color: #ff0000;">"FDETCHQ05"</span>, <span style="color: #00C800;">nil</span>   ;<br />         HEADERS <span style="color: #ff0000;">"DocNro"</span>,    <span style="color: #ff0000;">"FeVencim"</span>,  <span style="color: #ff0000;">"Monto"</span>, <span style="color: #ff0000;">"Check"</span> ;<br />         <span style="color: #0000ff;">ALIAS</span>   h0<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"DetaCheq32"</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cAlias</span><br /><br />WITH OBJECT oBrw<br />   WITH OBJECT :<span style="color: #000000;">Check</span><br />      :<span style="color: #000000;">bEditValue</span> := <span style="color: #000000;">&#123;</span> |x| nAt := AScan<span style="color: #000000;">&#40;</span> aSelected, oBrw:<span style="color: #000000;">BookMark</span> <span style="color: #000000;">&#41;</span>, ;<br />                           <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> x == <span style="color: #00C800;">nil</span>, nAt > <span style="color: #000000;">0</span>, ;<br />                           <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nAt == <span style="color: #000000;">0</span>, AAdd<span style="color: #000000;">&#40;</span> aSelected, oBrw:<span style="color: #000000;">BookMark</span> <span style="color: #000000;">&#41;</span>, ADel<span style="color: #000000;">&#40;</span> aSelected, nAt, .t. <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 />      :<span style="color: #000000;">SetCheck</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"bmp_Ok2"</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#125;</span>,.t.<span style="color: #000000;">&#41;</span><br />   END<br />   <span style="color: #B900B9;">//</span><br />   :<span style="color: #000000;">bLDblClick</span>    := <span style="color: #000000;">&#123;</span> || oBrw:<span style="color: #000000;">Check</span>:<span style="color: #000000;">CheckToggle</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />   :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />END<br /> </div>[/code:3h01cel0]
xBrowse - bmp en columna (SOLUCIONADO)
Sin novedad? <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> No se entiende o no se puede?
xBrowse - bmp en columna (SOLUCIONADO)
GREAT! many thanks!!
xBrowse - bmp en columna (SOLUCIONADO)
La manera que pretendía! (Another way!): [code=fw:12f4jz29]<div class="fw" id="{CB}" style="font-family: monospace;">    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oLstChq <span style="color: #0000ff;">ID</span> BRW_XBRW <span style="color: #0000ff;">OF</span> oDlg ;<br />            COLUMNS <span style="color: #ff0000;">"FDETCHQ02"</span>, <span style="color: #ff0000;">"FDETCHQ04"</span>, <span style="color: #ff0000;">"FDETCHQ05"</span>, <span style="color: #00C800;">nil</span>   ;<br />            HEADERS <span style="color: #ff0000;">"DocNro"</span>,    <span style="color: #ff0000;">"FeVencim"</span>,  <span style="color: #ff0000;">"Monto"</span>, <span style="color: #ff0000;">"Check"</span> ;<br />            <span style="color: #0000ff;">ALIAS</span>   h0<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"DetaCheq32"</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cAlias</span><br /><br />   WITH OBJECT oLstChq<br />      :<span style="color: #000000;">nMarqueeStyle</span>:= MARQSTYLE_HIGHLROW<br />      :<span style="color: #000000;">lFooter</span>      := <span style="color: #00C800;">TRUE</span><br />      :<span style="color: #000000;">lHScroll</span>     := <span style="color: #00C800;">FALSE</span><br /><br />      :<span style="color: #000000;">bKeyDown</span>  := <span style="color: #000000;">&#123;</span>|nK| <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> nK==VK_SPACE, ;<br />                              <span style="color: #000000;">&#40;</span> nTotSelec += <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> !HHasKey<span style="color: #000000;">&#40;</span> shSelect, h0<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"DetaCheq32"</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">RecNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, ;<br />                                                                     h0<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"DetaCheq32"</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">FDETCHQ05</span>, -h0<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"DetaCheq32"</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">FDETCHQ05</span> <span style="color: #000000;">&#41;</span>, ;<br />                                <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> !HHasKey<span style="color: #000000;">&#40;</span> shSelect, h0<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"DetaCheq32"</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">RecNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, ;<br />                                     HSet<span style="color: #000000;">&#40;</span> shSelect, h0<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"DetaCheq32"</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Recno</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, h0<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"DetaCheq32"</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Recno</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, ;<br />                                     HDel<span style="color: #000000;">&#40;</span> shSelect, h0<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"DetaCheq32"</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Recno</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>, ;<br />                                oLstChq:<span style="color: #000000;">Check</span>:<span style="color: #000000;">CheckToggle</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ;<br />                                oLstChq:<span style="color: #000000;">GoDown</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oLstChq:<span style="color: #0000ff;">Refresh</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;">&#125;</span><br />   END<br />   WITH OBJECT oLstChq:<span style="color: #000000;">Check</span><br />      :<span style="color: #000000;">bEditValue</span> := <span style="color: #000000;">&#123;</span> |x| x:= HHasKey<span style="color: #000000;">&#40;</span> shSelect, h0<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"DetaCheq32"</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">RecNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />      :<span style="color: #000000;">SetCheck</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"bmp_Ok2"</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#125;</span>,.t.<span style="color: #000000;">&#41;</span><br />   END<br /> </div>[/code:12f4jz29] Gracias Nageswaragunupudi
xBrowse - bug?
I have a databases with just one field When I move the horizontal thumb to the right I get the following error: Error description: Error BASE/1132 Bound error: array access Args: [ 1] = A { ... } [ 2] = N 0 Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE:TXBROWSE(418) Called from: => TXBROWSE:COLATPOS(0) Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:PAINT(1074) Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:DISPLAY(933) Called from: .\source\classes\CONTROL.PRG => TXBROWSE:HANDLEEVENT(1423) Called from: .\source\classes\WINDOW.PRG => _FWH(3333) Called from: => DIALOGBOXINDIRECT(0) Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE(273) Called from: .\source\function\ERRSYSW.PRG => ERRORDIALOG(343) Called from: .\source\function\ERRSYSW.PRG => (b)ERRORSYS(27) Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE:TXBROWSE(418) Called from: => TXBROWSE:COLATPOS(0) Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:PAINT(1074) Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:DISPLAY(933) Called from: .\source\classes\CONTROL.PRG => TXBROWSE:HANDLEEVENT(1423) Called from: .\source\classes\WINDOW.PRG => _FWH(3333) Called from: => DIALOGBOX(0) Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE(273) Called from: RIDAW.PRG => INDEXLISTE(3324) Database with two fields: no problem. I would like to have the horizontal scroll also with one field in case the field content is wider than the dimention of the browse. Is there a solution? Dietmar
xBrowse - bug?
Yes this is a bug while browsing a single column. Horizontal scroll is only used by xbrowse for skipping column to column. It is not used for scrolling text in a single wider column. Anyway the horizontal scroll bar does not serve your purpose. Let us await bug-fix. Till then disable horizontal scroll bar for single column browses
xBrowse - busqueda incremental (SOLUCIONADO)
Buen dia Gente trillado tema... <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> He definido un xBrowse así: [code=fw:9ex0dz40]<div class="fw" id="{CB}" style="font-family: monospace;">   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> ::<span style="color: #000000;">oLstP</span> <span style="color: #0000ff;">ID</span> BRW_XBRW <span style="color: #0000ff;">OF</span> oDlgP ;<br />            COLUMNS <span style="color: #ff0000;">"ID"</span>, <span style="color: #ff0000;">"TUTOR1"</span>  ;<br />            HEADERS <span style="color: #ff0000;">"ID"</span>, <span style="color: #ff0000;">"Tutor"</span>  ;<br />            <span style="color: #0000ff;">Alias</span>   cSQLAlias AUTOSORT<br /> </div>[/code:9ex0dz40] La DBF es administrada con ADS y lo particular es que creo una lista a traves de un Select, definido así: [code=fw:9ex0dz40]<div class="fw" id="{CB}" style="font-family: monospace;">   <span style="color: #00C800;">if</span> !ADSExecuteSQLDirect<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SELECT ID,TUTOR1 FROM BDF2WS01 WHERE FEAFIP1 "</span>+ ;<br />                            <span style="color: #ff0000;">"UNION SELECT ID,TUTOR2 FROM BDF2WS01 WHERE FEAFIP2 ORDER BY TUTOR1"</span> <span style="color: #000000;">&#41;</span><br />      MessageBox<span style="color: #000000;">&#40;</span>, <span style="color: #ff0000;">"Falla procesar código SQL en Tabla de Personas"</span>, <span style="color: #ff0000;">"Reintentar..."</span>, MB_ICONSTOP <span style="color: #000000;">&#41;</span><br />      SQLTutor-><span style="color: #000000;">&#40;</span> DbCloseArea<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span><br />   end<br />   cSQLAlias:= <span style="color: #0000ff;">Alias</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:9ex0dz40] Lo que ocurre es que cuando ingreso texto para realizar la búsqueda, esta no se realiza (tampoco muestra el icono indicando el orden). Salvo, que haga clic sobre la cabecera "Tutor" He forzado con :cOrder:= "A" para que muestre el ícono; pero la búsqueda no se ejecuta, salvo (insisto) que la active con clic sobre la cabecera. Se puede indicar que esté activa sin hacer clic en la cabecera? gracias P.D.: La razon de crear el xbrowse mediante el Select esta relacionado con esto: [url:9ex0dz40]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=6&t=31271#p181228[/url:9ex0dz40]
xBrowse - busqueda incremental (SOLUCIONADO)
[quote:zl39vwp0]SELECT ID,TUTOR1 FROM BDF2WS01 WHERE FEAFIP1 UNION SELECT ID,TUTOR2 FROM BDF2WS01 WHERE FEAFIP2 ORDER BY TUTOR1 [/quote:zl39vwp0] estimado, los WHERE estan bien?, no me parece una expresio valida. <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> has probado esta consulta desde el front ARC de ADS? me parece que esto seria mas adecuado: [quote:zl39vwp0] SELECT ID,TUTOR1 AS TUTOR FROM BDF2WS01 WHERE FEAFIP1=true UNION SELECT ID,TUTOR2 AS TUTOR FROM BDF2WS01 WHERE FEAFIP2=true [/quote:zl39vwp0] no es necesario el "order by" ya que lo ordenaras en la tabla con un index en tu caso, debes realizar un indexado luego de obtener el alias para que te funcione. [code=fw:zl39vwp0]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">SELECT</span> &cSQLAlias<br /><span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> TUTOR TAG TUTOR TEMPORARY<br />...<br /><span style="color: #0000ff;">xbrowse</span>....<br />...<br /> </div>[/code:zl39vwp0] salu2 carlos vargas
xBrowse - busqueda incremental (SOLUCIONADO)
Carlos; muchas gracias por interesarte en el tema. La sentencia es correcta, la descubrí por casualidad en algun momento que no escribi: CampoLogico=TRUE y no dió error (tal como la seguí escribiendo hasta ahora). Al parecer funciona a partir de ADS 10.x Aunque si queremos estar seguro nada mejor que indicar la igualdad <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> Acá el resultado [img:2am9qbxc]http&#58;//i795&#46;photobucket&#46;com/albums/yy237/MLimonG/Union&#46;jpg[/img:2am9qbxc] Tu aporte, del indice temporal, es lo que me estaba faltando muchas gracias!
xBrowse - busqueda incremental (SOLUCIONADO)
Sip, es que la instruccion sql es mas legible si indicas la igualdad, siempre a la orden.
xBrowse - búsqueda incremental
Estimados: Algo hago mal y no puedo encontrarle la vuelta Pretendo buscar en una DBF que la abro mediante tDBF (de M. Exposito) Cuando tecleo, no se mueve el cursor, como tampoco muestra lo que escribo en el SAY puesto al efecto [code=fw:3vdfh12o]<div class="fw" id="{CB}" style="font-family: monospace;">   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">ID</span> <span style="color: #000000;">301</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />            <span style="color: #0000ff;">ALIAS</span> hS3:<span style="color: #000000;">oDbPrv</span>:<span style="color: #000000;">cAlias</span> ;<br />            COLUMNS <span style="color: #ff0000;">"FPrv01"</span>, <span style="color: #ff0000;">"FPrv02"</span> AUTOSORT<br /><br />   <span style="color: #B900B9;">// Columnas</span><br />   WITH OBJECT oBrw:<span style="color: #000000;">oCol</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"FPrv01"</span> <span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">cHeader</span>:= <span style="color: #ff0000;">"CodProv"</span><br />   END<br />   WITH OBJECT oBrw:<span style="color: #000000;">oCol</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"FPrv02"</span> <span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">cHeader</span>:= <span style="color: #ff0000;">"Descripcion"</span><br />      :<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">210</span><br />   END<br /><br />   WITH OBJECT oBrw<br />      :<span style="color: #000000;">l2007</span>          := <span style="color: #00C800;">TRUE</span><br />      :<span style="color: #000000;">lAllowColHiding</span>:= <span style="color: #00C800;">FALSE</span>     <span style="color: #B900B9;">// Anular menu pop</span><br /><br />      :<span style="color: #000000;">lSeekWild</span>      := <span style="color: #00C800;">TRUE</span><br />   END<br /><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oBrw:<span style="color: #000000;">oSeek</span> <span style="color: #0000ff;">PROMPT</span> oBrw:<span style="color: #000000;">cSeek</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">10</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">COLOR</span> CLR_RED <span style="color: #0000ff;">UPDATE</span><br /> </div>[/code:3vdfh12o] falta algo?, que esta mal? muchas gracias
xBrowse - búsqueda incremental
Hola Mario, lo hago asi en la version 1204: [code=fw:9n30v0rh]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; WITH OBJECT oBrw<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nMarqueeStyle</span> &nbsp; &nbsp;:= MARQSTYLE_HIGHLROW &nbsp;<span style="color: #B900B9;">//_HIGHLROWMS</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nColDividerStyle</span>:=LINESTYLE_LIGHTGRAY<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nRowDividerStyle</span>:=LINESTYLE_LIGHTGRAY<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bClrSel</span> &nbsp; &nbsp; &nbsp; := <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#123;</span> nRGB<span style="color: #000000;">&#40;</span> &nbsp;<span style="color: #000000;">0</span>, &nbsp;<span style="color: #000000;">0</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span>, aGradBarSel <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> &nbsp;<span style="color: #B900B9;">// para barra de linea selecc cuando el control no tiene el foco</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bClrSelFocus</span> := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> CLR_BLACK, aGradBarSelFocus <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> &nbsp; &nbsp; <span style="color: #B900B9;">// para barra de linea selecc cuando el control tiene el foco</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lKinetic</span> &nbsp; &nbsp; &nbsp;:= .f.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lContrastClr</span> &nbsp;:= .f. &nbsp;<span style="color: #B900B9;">//para que no cambie color de texto automaticamente segun intensidad del fondo</span><br /><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bGotFocus</span>:= <span style="color: #000000;">&#123;</span>|| dbSelectArea<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Clientes"</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">Codigo</span>:<span style="color: #000000;">cSortOrder</span> &nbsp; := <span style="color: #ff0000;">"CLIENTES"</span> &nbsp; <span style="color: #B900B9;">//los indices</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nombre</span>:<span style="color: #000000;">cSortOrder</span> &nbsp; := <span style="color: #ff0000;">"NOMBCLTE"</span> <br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">apellido</span>:<span style="color: #000000;">cSortOrder</span> := <span style="color: #ff0000;">"APELCLTE"</span> <br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">cedulaide</span>:<span style="color: #000000;">cSortOrder</span>:= <span style="color: #ff0000;">"CEDULIDE"</span> <br />&nbsp; &nbsp;END<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oTextBusc <span style="color: #0000ff;">PROMPT</span> cTextBusc <span style="color: #0000ff;">ID</span> <span style="color: #000000;">4003</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">UPDATE</span><br />&nbsp; &nbsp;oTextBusc:<span style="color: #000000;">cTooltip</span>:= <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Click sobre cabecera de columna para busqueda respectiva"</span>,<span style="color: #ff0000;">"BUSQUEDA INCREMENTAL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span><span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">bSeek</span> := <span style="color: #000000;">&#123;</span>|c| Clientes-><span style="color: #000000;">&#40;</span> DbSeek<span style="color: #000000;">&#40;</span>UPPER<span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span>,.t.<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">oSeek</span> := oTextBusc<br />&nbsp;</div>[/code:9n30v0rh] Espero te sirva de guia. Saludos.
xBrowse - búsqueda incremental
Francisco La metodología funciona, muchas gracias! Lo que me confunde es que en los samples (pocos), no usan :bSeek Saludos
xBrowse - búsqueda incremental
Continúo con este tema ya que si bien he solucionado la búsqueda incremental con lo sugerido por Horacio, luego. mirando el sample: xbincflt.prg, y luego de muchas pruebas, finalmente, consigo la búsqueda con el siguiente código: [code=fw:3my3nkva]<div class="fw" id="{CB}" style="font-family: monospace;">   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">ID</span> <span style="color: #000000;">301</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />            COLUMNS <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"FPrv01"</span>, <span style="color: #ff0000;">"FPrv02"</span><span style="color: #000000;">&#125;</span> ;<br />            HEADERS <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"CodPrv"</span>, <span style="color: #ff0000;">"Descripcion"</span> <span style="color: #000000;">&#125;</span> ;<br />            <span style="color: #0000ff;">ALIAS</span> hS3:<span style="color: #000000;">oDbPrv</span>:<span style="color: #000000;">cAlias</span>  AUTOSORT<br /><br /><br />   <br />   WITH OBJECT oBrw<br />      :<span style="color: #000000;">lSeekWild</span>     := .f.     <span style="color: #B900B9;">// Con este en falso HACE la búsqueda incremental</span><br /><br />      :<span style="color: #000000;">bKeyDown</span>:= <span style="color: #000000;">&#123;</span>|nK| <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> nK==VK_RETURN, <span style="color: #000000;">&#40;</span> hS3:<span style="color: #000000;">oDbPrv</span>:<span style="color: #000000;">Load</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oSProv:<span style="color: #000000;">VarPut</span><span style="color: #000000;">&#40;</span> hS3:<span style="color: #000000;">oDbPrv</span>:<span style="color: #000000;">FPRV02</span> <span style="color: #000000;">&#41;</span>, oSProv:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ;<br />                                             oBrw:<span style="color: #000000;">End</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>, <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />   END<br /><br />   WITH OBJECT oBrw:<span style="color: #000000;">oCol</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"CodPrv"</span> <span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">bLDClickData</span>:= <span style="color: #000000;">&#123;</span>|| Eval<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">bKeyDown</span>, VK_RETURN <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />   END<br />   WITH OBJECT oBrw:<span style="color: #000000;">oCol</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Descripcion"</span> <span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">220</span><br /><br />      :<span style="color: #000000;">bLDClickData</span>:= <span style="color: #000000;">&#123;</span>|| Eval<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">bKeyDown</span>, VK_RETURN <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />   END<br /> </div>[/code:3my3nkva] Ahora bien; me pareció buena idea, por lo visto en el sample, usar el Filtro; entonces mi código quedaría: [code=fw:3my3nkva]<div class="fw" id="{CB}" style="font-family: monospace;">  WITH OBJECT oBrw<br />      :<span style="color: #000000;">lIncrFilter</span>   := <span style="color: #00C800;">TRUE</span>     <span style="color: #B900B9;">// Con ese en verdadero, y lSekkWild = .T., busca POR CONTENIDO</span><br />      :<span style="color: #000000;">lSeekWild</span>     := .T.     <span style="color: #B900B9;">// Con este en falso HACE la búsqueda incremental</span><br />      :<span style="color: #000000;">cFilterFld</span>    := <span style="color: #ff0000;">"FPRV02"</span><br />      :<span style="color: #000000;">Seek</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#41;</span>    <span style="color: #B900B9;">//oBrw:cSeek</span><br /><br />      :<span style="color: #000000;">bKeyDown</span>:= <span style="color: #000000;">&#123;</span>|nK| <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> nK==VK_RETURN, <span style="color: #000000;">&#40;</span> hS3:<span style="color: #000000;">oDbPrv</span>:<span style="color: #000000;">Load</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oSProv:<span style="color: #000000;">VarPut</span><span style="color: #000000;">&#40;</span> hS3:<span style="color: #000000;">oDbPrv</span>:<span style="color: #000000;">FPRV02</span> <span style="color: #000000;">&#41;</span>, oSProv:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ;<br />                                             oBrw:<span style="color: #000000;">End</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>, <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />   END<br /><br />   WITH OBJECT oBrw:<span style="color: #000000;">oCol</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"CodPrv"</span> <span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">bLDClickData</span>:= <span style="color: #000000;">&#123;</span>|| Eval<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">bKeyDown</span>, VK_RETURN <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />   END<br />   WITH OBJECT oBrw:<span style="color: #000000;">oCol</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Descripcion"</span> <span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">220</span><br /><br />      :<span style="color: #000000;">bLDClickData</span>:= <span style="color: #000000;">&#123;</span>|| Eval<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">bKeyDown</span>, VK_RETURN <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />   END<br /><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oBrw:<span style="color: #000000;">oSeek</span> <span style="color: #0000ff;">PROMPT</span> Upper<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cSeek</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">10</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">COLOR</span> CLR_RED <span style="color: #0000ff;">UPDATE</span><br /> </div>[/code:3my3nkva] En este caso el filtro por "Contenido" se produce...peeeeroooo, si deseo un filtro por "Que comience con", lo que entiendo sería poniendo :lSeekWild:= .f., entonces NO HACE NADA. Pero, evidentemente algo esta mal en mi codigo, ya que si al sample lo reemplazo para que abra mi DBF, todo lo hace OK! En que difiere respecto al sample?. En que uso ADS y abro las DBFs con TDBF (aunque para el manejo del xBrowse, solo le estoy dando foco al ls DBF en cuestion) Espero opiniones, gracias
xBrowse - búsqueda incremental
Sin solución para esto?
xBrowse - búsqueda incremental
Mario, Deberías por favor proporcionar un ejemplo autocontenido para que el equipo de Fivetech lo mire. Siempre que he tenido un problema les facilito el ejemplo para que lo puedan reproducir <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->.
xBrowse - búsqueda incremental
Lucas, gracias por la recomendación. Lo estoy preparando
xBrowse - control de combinacion de teclas
Hola Gente; En un xBrowse tengo lo siguiente [code=fw:10x2rr7i]<div class="fw" id="{CB}" style="font-family: monospace;">      oBrw:<span style="color: #000000;">bKeyDown</span>:= <span style="color: #000000;">&#123;</span>|nK| <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> GetKeyState<span style="color: #000000;">&#40;</span> VK_CONTROL <span style="color: #000000;">&#41;</span> .and. nK==VK_X, <span style="color: #ff0000;">"OK"</span>, <span style="color: #ff0000;">"tecla/s erroneas"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /> </div>[/code:10x2rr7i]La respuesta es que, siempre, evalúa la pulsación de la tecla Control; por lo que recibo respuesta por .F. Probé con ACC_CONTROL; pero el efecto es el mismo También probé con GetKeyState( VK_CONTROL ) + GetKeyState( VK_X )... sin el resultado esperado Cual es la forma correcta? gracias
xBrowse - control de combinacion de teclas
[code=fw:bk39o3rv]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">bKeyDown</span> := <span style="color: #000000;">&#123;</span> | nKey | StdKey<span style="color: #000000;">&#40;</span> nKey <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> StdKey<span style="color: #000000;">&#40;</span> nKey <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> GETKEYSTATE<span style="color: #000000;">&#40;</span> VK_UP <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span> .F. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">do</span> <span style="color: #00C800;">case</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> nKey == <span style="color: #000000;">65</span> .and. GetKeyState<span style="color: #000000;">&#40;</span> VK_CONTROL <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Crtl + A</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CreateInfoArticulo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> nKey == <span style="color: #000000;">66</span> .and. GetKeyState<span style="color: #000000;">&#40;</span> VK_CONTROL <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Crtl + B</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;BrwSelArticulo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> nKey == <span style="color: #000000;">68</span> .and. GetKeyState<span style="color: #000000;">&#40;</span> VK_CONTROL <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Crtl + C</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;BrwClient<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> nKey == <span style="color: #000000;">38</span> .and. GetKeyState<span style="color: #000000;">&#40;</span> VK_CONTROL <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Ctrl + Down</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NextEmpresa<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> nKey == <span style="color: #000000;">40</span> .and. GetKeyState<span style="color: #000000;">&#40;</span> VK_CONTROL <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Ctrl + Up</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PriorEmpresa<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> nKey == <span style="color: #000000;">48</span> .and. GetKeyState<span style="color: #000000;">&#40;</span> VK_CONTROL <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Ctrl + 0</span><br /><br />&nbsp; &nbsp; &nbsp; ...<br /><br />&nbsp; &nbsp;end <span style="color: #00C800;">case</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">Nil</span><br />&nbsp;</div>[/code:bk39o3rv]
xBrowse - control de combinacion de teclas
Gracias Karinha!!
xBrowse - dbSeek
If there is no index order selected and you use oxBrw:bSeek := {|c| DbSeek( Upper( c ) ) } xBrowse crashes. Perhaps xBrowse could handle this. I use oxBrw:bSeek := {|c| iif( indexord() > 0,; DbSeek( Upper( c ) ) ,( msginfo("keine Sortierung ausgewählt"), .f.) ) } Best regards, Otto
xBrowse - dbSeek
Otto, With what error? You should either be using alias referencing or better, a database object. James
xBrowse - dbSeek
Hello James, thank you for your answer. Workarea not in use. I only think that xBrowse should handle such input errors and act like a blackbox. You can reproduce what I mean if you insert a set order to before: oxBrw:bSeek := {|c| DbSeek( Upper( c ) ) } Best regards, Otto Best regards, Otto
xBrowse - dbSeek
Otto, Try this: oxBrw:bSeek := {|c| (::cAlias)->(DbSeek( Upper( c ) )) } Take a look at TXBrowse:setRDD(). If you use that and set lAutoOrder =.t. then you bSeek will be set automatically by xbrowse. James
xBrowse - dbSeek
[quote:2nac3ime]oxBrw:bSeek := {|c| (::cAlias)->(DbSeek( Upper( c ) )) }[/quote:2nac3ime] Even this fails if no order is set. XBrowse assigns a default bSeek only when lAutoOrder is specified. When we specify lAutoOrder, it is better to leave the responsibility of defining bSeek to XBrowse. If lAutoOrder is not specified and incremental search is desired, it is the responsibility of the programmer to specify a safe and appropriate codeblock for bSeek, taking care of the appropriate alias, checking indexorder, etc. XBrowse supports any kind of data collection, not necessarily the well known dbf, array, recset, etc. So when the codeblocks are directly defined by the programmer, he is expected to take full responsibility of the necessary checks.
xBrowse - drag & drop
Could someone please test: For me oBrw:oDragCursor := oCursor does only show the oCursor if the mouse is inside the rowselector column. Best regards, Otto
xBrowse - drag & drop
can have a small test to test it ? have you seen this <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=17893&p=93466#p93466">viewtopic.php?f=3&t=17893&p=93466#p93466</a><!-- l --> ? it run ok but if I use 4 group and 4 xbrowse on different folders it not run Perhaps you can create a test for your problem with it
xBrowse - drag & drop
[quote="Otto":2vwean31]Could someone please test: For me oBrw:oDragCursor := oCursor does only show the oCursor if the mouse is inside the rowselector column. Best regards, Otto[/quote:2vwean31] For me drag cursor is working even when the mouse is in data area. May I know which version are you using? What you said was true in earlier versions.
xBrowse - drag & drop
Hello Mr. Rao, Now I tested with the last FWH release and all works as suspected. Thank you for your help. Best reagrds, Otto
xBrowse - drag - getfocus - error
I have 2 xBrowse on a WINDOW. If you click inside the left and then in the right xBrowse xBrowse the drag mode starts although you don’t hold down the mouse key. When the twin browses are on a dialog there is no problem. But the problem is when the browses are on a window. Thanks in advance Otto [code=fw:2bok7u49]<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: #B900B9;">//#define USEDLG</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> oWnd, oPanel, oState, oCust, oFont, oCur<br />   <span style="color: #00C800;">local</span> nWidth<br /><br />   SetKinetic<span style="color: #000000;">&#40;</span> .f. <span style="color: #000000;">&#41;</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;">-12</span><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">CURSOR</span> oCur DRAG<br /><br />#ifdef USEDLG<br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">600</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br />   nWidth      := <span style="color: #000000;">100</span><br />   oPanel      := oWnd<br />#else<br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br />   oWnd:<span style="color: #000000;">SetFont</span><span style="color: #000000;">&#40;</span> oFont <span style="color: #000000;">&#41;</span><br /><br />   nWidth      := <span style="color: #000000;">200</span><br />   oPanel      := oWnd<br />#endif<br /><br />   USE STATES <span style="color: #00C800;">NEW</span><br />   USE CUSTOMER <span style="color: #00C800;">NEW</span><br /><br />   @ <span style="color: #000000;">10</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">XBROWSE</span> oState <span style="color: #0000ff;">SIZE</span> nWidth,<span style="color: #000000;">-10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oPanel ;<br />      COLUMNS <span style="color: #ff0000;">'NAME'</span> <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">'STATES'</span> CELL LINES NOBORDER<br /><br />   @ <span style="color: #000000;">10</span>,nWidth <span style="color: #0000ff;">XBROWSE</span> oCust <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-10</span>,<span style="color: #000000;">-10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oPanel ;<br />      <span style="color: #0000ff;">AUTOCOLS</span> <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">'CUSTOMER'</span> CELL LINES NOBORDER<br /><br />   WITH OBJECT oCust<br />      :<span style="color: #000000;">oDragCursor</span>   := oCur<br />      :<span style="color: #000000;">bDragBegin</span>    := <span style="color: #000000;">&#123;</span> || <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#125;</span><br />      :<span style="color: #000000;">bGotFocus</span>     := <span style="color: #000000;">&#123;</span> || <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#125;</span><br />      :<span style="color: #000000;">lAllowRowSizing</span>  := .f.<br />   END<br /><br />   oState:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oCust:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />#ifdef USEDLG<br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oWnd <span style="color: #0000ff;">CENTERED</span><br />#else<br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span><br />#endif<br /><br />   <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br />   <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">CURSOR</span> oCur<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">//------------------------------------</span><br /><br /> </div>[/code:2bok7u49]
xBrowse - drag - getfocus - error
I too confirm the problem. The problem is only when the window is activated in MAXMIZED mode, not when activated normally.
xBrowse - drag - getfocus - error
I began to log control.prg, windows.prg and xbrowse: This is what I found so fare: This is when I stay inside the xBrowse and click on different rows: [quote:1b4cyg9c]06.10.2010 12:31:20: LButtonDown xbrowse##### 06.10.2010 12:31:20: -(4)--->><LButtonDown xbrowse##### return Super:LButtonDown 06.10.2010 12:31:20: CONTROL: LButtonDown ::lMouseDown .T. TXBROWSE ::lDrag .F. 06.10.2010 12:31:20: return Super:LButtonDown: CONTROL: LButtonDown ::lMouseDown .T. TXBROWSE ::lDrag .F. 06.10.2010 12:31:20: xbrowse - LButtonUp 06.10.2010 12:31:20: CONTROL - LButtonUp .F. 06.10.2010 12:31:20: bLostFocus TXBROWSE - 4393184 - 06.10.2010 12:34:42: nach bGotFocus TXBROWSE - 4588584 - 06.10.2010 12:34:43: LButtonDown xbrowse##### 06.10.2010 12:34:43: -(5)--->><LButtonDown xbrowse##### return Super:LButtonDown 06.10.2010 12:34:43: CONTROL: LButtonDown ::lMouseDown .T. TXBROWSE ::lDrag .F. 06.10.2010 12:34:43: return Super:LButtonDown: CONTROL: LButtonDown ::lMouseDown .T. TXBROWSE ::lDrag .F. 06.10.2010 12:34:43: xbrowse - LButtonUp 06.10.2010 12:34:43: CONTROL - LButtonUp .F. 06.10.2010 12:34:43: windows - LButtonUp TXBROWSE [/quote:1b4cyg9c] Here is when xBrowse gets focus: lButtonDown is not executed first but then LButtonUp executes LButtonDown – but I don’t understand why [quote:1b4cyg9c]06.10.2010 12:31:19: nach bGotFocus TXBROWSE - 5835110 - 06.10.2010 12:31:19: xbrowse - LButtonUp 06.10.2010 12:31:19: CONTROL - LButtonUp .F. 06.10.2010 12:31:19: windows - LButtonUp TXBROWSE 06.10.2010 12:31:19: -(5)--->><LButtonDown xbrowse##### return Super:LButtonDown 06.10.2010 12:31:19: CONTROL: LButtonDown ::lMouseDown .T. TXBROWSE ::lDrag .F. 06.10.2010 12:31:19: return Super:LButtonDown: CONTROL: LButtonDown ::lMouseDown .T. TXBROWSE ::lDrag .F. 06.10.2010 12:31:19: .T. 06.10.2010 12:31:19: bDragBegin 06.10.2010 12:31:19: .T. 06.10.2010 12:31:19: .T. 06.10.2010 12:31:19: .T. 06.10.2010 12:31:19: .T. 06.10.2010 12:31:19: .T.[/quote:1b4cyg9c]
xBrowse - drag - getfocus - error
Mr. Otto please comment the SysRefresh in METHOD LButtonDown( nRow, nCol, nFlags ) CLASS TXBrowse [code=fw:3vzti55l]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #B900B9;">// &nbsp; &nbsp; SysRefresh()</span></div>[/code:3vzti55l] (just only one) test this change please
xBrowse - drag - getfocus - error
Mr. Otto please comment the SysRefresh in METHOD LButtonDown( nRow, nCol, nFlags ) CLASS TXBrowse [code=fw:3t0rajmu]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #B900B9;">//     SysRefresh()</span></div>[/code:3t0rajmu] (just one) test this change please
xBrowse - drag - getfocus - error
Hallo Daniel, thank you so much. The problem is solved. Best regards, Otto
xBrowse - dumb question
Hello Everyone, Sorry for asking this question, I have not been able to find exact answer on forum or in sample code. 1. How do I highlight entire xBrowse row? At this point I am only able to highlight individual cells. 2. I am using ADO to connect to SQL, after I insert a new record, I would like cursor position of recordset to move the newly corrected record, how do I do that? 3. Also related to ADO, when I exit a data entry and return to recordset, how do I move cursor to record that was just selected. Thank you in advance for your patience and assistance
xBrowse - dumb question
Darrell, 1. oBrw:nMarqueeStyle := MARQSTYLE_HIGHLROW
xBrowse - dumb question
Darrell, 2. Basically you have to do this (thats what we do and works in FWH samples FiveDBU.prg): [code=fw:22k9qi3p]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> RSAppendBlank<span style="color: #000000;">&#40;</span> oRS <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> n, aValues := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><br />   oRS:<span style="color: #000000;">MoveLast</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">for</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> oRS:<span style="color: #000000;">Fields</span>:<span style="color: #0000ff;">Count</span><br />      AAdd<span style="color: #000000;">&#40;</span> aValues, oRS:<span style="color: #000000;">Fields</span><span style="color: #000000;">&#91;</span> n - <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Value</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">if</span> n == <span style="color: #000000;">1</span> .and. ValType<span style="color: #000000;">&#40;</span> aValues<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: #ff0000;">"N"</span><br />         aValues<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>++<br />      <span style="color: #00C800;">else</span><br />         aValues<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> = uValBlank<span style="color: #000000;">&#40;</span> aValues<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> aValues<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"D"</span> .and. Empty<span style="color: #000000;">&#40;</span> aValues<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />            aValues<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> = Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">endif</span>              <br />      <span style="color: #00C800;">endif</span><br />   <span style="color: #00C800;">next</span><br /><br />   oRS:<span style="color: #000000;">AddNew</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">for</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> oRS:<span style="color: #000000;">Fields</span>:<span style="color: #0000ff;">Count</span><br />      <span style="color: #00C800;">if</span> n == <span style="color: #000000;">1</span> <br />         <span style="color: #00C800;">if</span> ! ValType<span style="color: #000000;">&#40;</span> aValues<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"N"</span><br />            oRS:<span style="color: #000000;">Fields</span><span style="color: #000000;">&#91;</span> n - <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Value</span> = aValues<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><br />         <span style="color: #00C800;">endif</span><br />      <span style="color: #00C800;">else</span>   <br />         oRS:<span style="color: #000000;">Fields</span><span style="color: #000000;">&#91;</span> n - <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">Value</span> = aValues<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><br />      <span style="color: #00C800;">endif</span>   <br />   <span style="color: #00C800;">next</span><br />   <br />   oRS:<span style="color: #0000ff;">Update</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:22k9qi3p]
xBrowse - dumb question
Daniel [quote:3k91xenk] 1. How do I highlight entire xBrowse row? At this point I am only able to highlight individual cells. [/quote:3k91xenk] [code=fw:3k91xenk]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oLbx:<span style="color: #000000;">nMarqueeStyle</span> := MARQSTYLE_HIGHLROW<br /> </div>[/code:3k91xenk] [quote:3k91xenk] 2. I am using ADO to connect to SQL, after I insert a new record, I would like cursor position of recordset to move the newly corrected record, how do I do that? 3. Also related to ADO, when I exit a data entry and return to recordset, how do I move cursor to record that was just selected. [/quote:3k91xenk] A small snipit of code .. on Add .. assign a variable to your rows primary key then moveFirst and Find your primary key .. then oLbx:ReFresh() .. That will take you to your new row. Rick Lipkin [code=fw:3k91xenk]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">IF</span> cMODE = <span style="color: #ff0000;">"A"</span><br /><br />   nEID := _GenEid<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">// create a unique primary key or you can use AutoNumber or Counter</span><br />   <span style="color: #00C800;">IF</span> nEID = <span style="color: #000000;">-1</span><br />      <span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span>.F.<span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">ENDIF</span><br /><br />   oRsEmp:<span style="color: #000000;">AddNew</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oRsEmp:<span style="color: #000000;">Fields</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"StaffNo"</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span>     := nEID<br /><br /><span style="color: #00C800;">ENDIF</span><br /><br />oRsEmp:<span style="color: #000000;">Fields</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"UserId"</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span>     := cUserId<br />oRsEmp:<span style="color: #000000;">Fields</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"FName"</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span>      := UpperLower<span style="color: #000000;">&#40;</span>cFName<span style="color: #000000;">&#41;</span><br />oRsEmp:<span style="color: #000000;">Fields</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"LName"</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span>      := UpperLower<span style="color: #000000;">&#40;</span>cLName<span style="color: #000000;">&#41;</span><br />oRsEmp:<span style="color: #000000;">Fields</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Password"</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span>   := Encrypt<span style="color: #000000;">&#40;</span>cPassword<span style="color: #000000;">&#41;</span><br /><br />oRsEmp:<span style="color: #0000ff;">Update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #00C800;">IF</span> cMODE = <span style="color: #ff0000;">"A"</span><br />   oRsEmp:<span style="color: #000000;">Sort</span> := <span style="color: #ff0000;">"Lname"</span><br />   oRsEmp:<span style="color: #000000;">MoveFirst</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oRsEmp:<span style="color: #000000;">Find</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"StaffNo = "</span>+ltrim<span style="color: #000000;">&#40;</span>str<span style="color: #000000;">&#40;</span>nEID<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">// new row</span><br /><span style="color: #00C800;">ENDIF</span><br /><br />oLbx:<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: #000000;">&#40;</span><span style="color: #00C800;">NIL</span><span style="color: #000000;">&#41;</span><br /><br /> </div>[/code:3k91xenk]
xBrowse - dumb question
Darrell, 3. You use bookmarks. Basically: local nAt := oRs:BookMark ... oRs:BookMark = nAt FWH xbrowse provides a Method that automatizes all that (including the refresh of the browse): local nAt := oBrw:BookMark ... oBrw:BookMark := nAt
xBrowse - dumb question
Awesome! Thank you so much!
xBrowse - edit
Hi all, how can I change the possibiltiy to edit a value on the fly depending on special condition ? If the condition is .t., user can edit, if it is .f. editing is not allowed. So the permission to edit changes from row to row. oBrw:aCols[3]:nEditType := IIF (oBrw:aCols[2]= 0, EDIT_NONE, EDIT_GET) is not working.
xBrowse - edit
Stefan, Try to use oBrowse:bChange to do it: oBrw:bChange := { || oBrw:aCols[3]:nEditType := IIF (oBrw:aCols[2]= 0, EDIT_NONE, EDIT_GET) }
xBrowse - edit
How can oBrw:aCols[2] be Zero ?
xBrowse - edit
Antonio, that´s it, it´s working perfectly <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Thanks. NageswaraRao, I´m browsing an array and the value on the second position (that is the second column) is zero. But you are right, exactly I should write Eval(oBrw:aCols[2]:bStrData)
xBrowse - edit
Nedittype change into block, that is very good. obrow:acols[2]:nedittype:={||mycondition} Some other codes change ocol:nedittype into if(valtype(ocol:nedittype)=="B",eval(ocol:nedittype),ocol:nedittype) Regards! Shuming Wang
xBrowse - edits of dbf doesn't stick
What am I missing? i. Whatever value I keyed-in doesn't stick (in other words, not saved). ii. The combobox displays 'Sunday' as 'Su' only. Here's a self-contained sample. [code=fw:2tobw5dc]<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> test<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">local</span> bColor<br />  <span style="color: #00C800;">local</span> aDay := <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"None"</span>,<span style="color: #ff0000;">"Sunday"</span>, <span style="color: #ff0000;">"Monday"</span>, <span style="color: #ff0000;">"Tuesday"</span>, <span style="color: #ff0000;">"Wednesday"</span>, <span style="color: #ff0000;">"Thursday"</span>, <span style="color: #ff0000;">"Friday"</span>, <span style="color: #ff0000;">"Saturday"</span><span style="color: #000000;">&#125;</span><br />  <span style="color: #00C800;">local</span> obrw, obold, obtncnl, oDlg<br /><br /><br />  dbcreate<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"person"</span>, <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"empno"</span>  , <span style="color: #ff0000;">"c"</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span>, ;<br />                      <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"name"</span>   , <span style="color: #ff0000;">"c"</span>,<span style="color: #000000;">40</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span>, ;<br />                      <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"proxyno"</span>, <span style="color: #ff0000;">"c"</span>,<span style="color: #000000;">20</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span>, ;<br />                      <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"timein"</span> , <span style="color: #ff0000;">"c"</span>, <span style="color: #000000;">5</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span>, ;<br />                      <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"timeout"</span>, <span style="color: #ff0000;">"c"</span>, <span style="color: #000000;">5</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span>, ;<br />                      <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"tea_m"</span>  , <span style="color: #ff0000;">"n"</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span>, ;<br />                      <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"lunch_min"</span>, <span style="color: #ff0000;">"n"</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span>, ;<br />                      <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"tea_a"</span>  , <span style="color: #ff0000;">"n"</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span>, ;<br />                      <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"others_min"</span>,<span style="color: #ff0000;">"n"</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span>, ;<br />                      <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"weekend1"</span>,<span style="color: #ff0000;">"c"</span>, <span style="color: #000000;">9</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span>, ;<br />                      <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"weekend2"</span>,<span style="color: #ff0000;">"c"</span>, <span style="color: #000000;">9</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span>, ;<br />                      <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"halfday"</span> ,<span style="color: #ff0000;">"c"</span>, <span style="color: #000000;">9</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span>  ;<br />                     <span style="color: #000000;">&#125;</span>                        ;<br />          <span style="color: #000000;">&#41;</span><br /><br />  use person <span style="color: #00C800;">new</span> exclusive<br />  append blank<br />  person->empno    := <span style="color: #ff0000;">"E0000001"</span><br />  person->name     := <span style="color: #ff0000;">"John Doe"</span><br />  person->proxyno  := <span style="color: #ff0000;">"00123"</span><br />  person->timein   := <span style="color: #ff0000;">"09:00"</span><br />  person->timeout  := <span style="color: #ff0000;">"18:00"</span><br />  person->lunch_min := <span style="color: #000000;">60</span><br />  person->weekend1 := <span style="color: #ff0000;">"Sunday"</span><br />  person->weekend2 := <span style="color: #ff0000;">"Saturday"</span><br /><br />  append blank<br />  person->empno    := <span style="color: #ff0000;">"E0000002"</span><br />  person->name     := <span style="color: #ff0000;">"Jane Doe"</span><br />  person->proxyno  := <span style="color: #ff0000;">"00122"</span><br />  person->timein   := <span style="color: #ff0000;">"09:00"</span><br />  person->timeout  := <span style="color: #ff0000;">"18:00"</span><br />  person->lunch_min := <span style="color: #000000;">60</span><br />  person->weekend1 := <span style="color: #ff0000;">"Sunday"</span><br />  person->weekend2 := <span style="color: #ff0000;">"Saturday"</span><br /><br /><br /><br />  <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oBold <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">'VERDANA'</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-14</span> BOLD<br /><br />  <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"SETTINGS"</span><br /><br />  <span style="color: #0000ff;">redefine</span> <span style="color: #0000ff;">xbrowse</span> oBrw <span style="color: #0000ff;">id</span> <span style="color: #000000;">13</span> <span style="color: #0000ff;">of</span> oDlg ;<br />     fields person-><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>, person->empno, person->name, person->proxyno, ;<br />            person->timeIn, person->timeOut, person->tea_m, person->lunch_min, ;<br />            person->tea_a, person->others_min, person->weekend1, person->weekend2, ;<br />            person->halfday                                   ;<br />     headers <span style="color: #ff0000;">"No"</span>, <span style="color: #ff0000;">"Code"</span>, <span style="color: #ff0000;">"Name"</span>, <span style="color: #ff0000;">" Proxy Card Number"</span>, <span style="color: #ff0000;">"In"</span>, <span style="color: #ff0000;">"Out"</span>, <span style="color: #ff0000;">"Morning"</span>+CRLF+<span style="color: #ff0000;">"Tea"</span>, ;<br />             <span style="color: #ff0000;">"Lunch"</span>, <span style="color: #ff0000;">"Afternoon"</span>+CRLF+<span style="color: #ff0000;">"Tea"</span>, <span style="color: #ff0000;">"Others"</span>, <span style="color: #ff0000;">"WeekEnd1"</span>, <span style="color: #ff0000;">"WeekEnd2"</span>, <span style="color: #ff0000;">"Half-Day"</span>  ;<br />     pictures ,,,replicate<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"9"</span>, len<span style="color: #000000;">&#40;</span>person->proxyno<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">"99:99"</span>,<span style="color: #ff0000;">"99:99"</span>,<span style="color: #ff0000;">"99"</span>,<span style="color: #ff0000;">"99"</span>,<span style="color: #ff0000;">"99"</span>,<span style="color: #ff0000;">"99"</span> ;<br />     <span style="color: #0000ff;">alias</span> <span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'person'</span><span style="color: #000000;">&#41;</span> fastedit lines cell <span style="color: #B900B9;">//update</span><br /><br />     oBrw:<span style="color: #000000;">lAllowColSwapping</span> := .f.<br />     AEval<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aCols</span>, <span style="color: #000000;">&#123;</span> |o| o:<span style="color: #000000;">nEditType</span> := EDIT_GET <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span><br /><br />     oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bEditValid</span> := <span style="color: #000000;">&#123;</span>|oGet, oCol| verifyTime<span style="color: #000000;">&#40;</span>oGet:<span style="color: #000000;">value</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br />     oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bEditValid</span> := <span style="color: #000000;">&#123;</span>|oGet, oCol| verifyTime<span style="color: #000000;">&#40;</span>oGet:<span style="color: #000000;">value</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br /><br />     with object oBrw:<span style="color: #000000;">WeekEnd1</span><br />      :<span style="color: #000000;">nEditType</span>        := EDIT_LISTBOX<br />      :<span style="color: #000000;">aEditListTxt</span>     := aDay<br />     end<br /><br />     with object oBrw:<span style="color: #000000;">WeekEnd2</span><br />      :<span style="color: #000000;">nEditType</span>        := EDIT_LISTBOX<br />      :<span style="color: #000000;">aEditListTxt</span>     := aDay<br />     end<br /><br />     oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">13</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nEditType</span>    := EDIT_LISTBOX<br />     oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">13</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">aEditListTxt</span> := aDay<br /><br /><br />  oBrw:<span style="color: #000000;">SetGroupHeader</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Employee"</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">3</span>, oBold<span style="color: #000000;">&#41;</span><br />  oBrw:<span style="color: #000000;">SetGroupHeader</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Time"</span>, <span style="color: #000000;">5</span>, <span style="color: #000000;">6</span>, oBold<span style="color: #000000;">&#41;</span><br />  oBrw:<span style="color: #000000;">SetGroupHeader</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"In minutes"</span>, <span style="color: #000000;">7</span>, <span style="color: #000000;">10</span>, oBold<span style="color: #000000;">&#41;</span><br /><br /><br />  <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtnCnl <span style="color: #0000ff;">ID</span> <span style="color: #000000;">62</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 /><br />  <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">center</span> <span style="color: #0000ff;">on</span> <span style="color: #0000ff;">init</span> oBrw:<span style="color: #000000;">gotop</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 /><span style="color: #B900B9;">//----------------------------------------------------------------------</span><br /><span style="color: #00C800;">function</span> verifytime<span style="color: #000000;">&#40;</span>cTime<span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">local</span> hrs := val<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">left</span><span style="color: #000000;">&#40;</span>cTime,<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>, mins := val<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">right</span><span style="color: #000000;">&#40;</span>cTime,<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">local</span> lRet := .t.<br />  <span style="color: #00C800;">if</span> hrs < <span style="color: #000000;">0</span> .or. hrs > <span style="color: #000000;">23</span><br />     lRet := .f.<br />  <span style="color: #00C800;">else</span><br />     <span style="color: #00C800;">if</span> mins < <span style="color: #000000;">0</span> .or. mins > <span style="color: #000000;">59</span><br />        lRet := .f.<br />     <span style="color: #00C800;">endif</span><br />  <span style="color: #00C800;">endif</span><br />  <span style="color: #00C800;">if</span> !lRet<br />     msgalert<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Valid time values are from 00:00 to 23:59 only!"</span><span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">return</span> lRet<br /> </div>[/code:2tobw5dc] The rc. [code=fw:2tobw5dc]<div class="fw" id="{CB}" style="font-family: monospace;"><br />SETTINGS <span style="color: #0000ff;">DIALOG</span> <span style="color: #000000;">9</span>, <span style="color: #000000;">60</span>, <span style="color: #000000;">400</span>, <span style="color: #000000;">271</span><br /><span style="color: #0000ff;">STYLE</span> DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME<br />CAPTION <span style="color: #ff0000;">"Employees' Settings"</span><br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">10</span>, <span style="color: #ff0000;">"System"</span><br /><span style="color: #000000;">&#123;</span><br /> CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">13</span>, <span style="color: #ff0000;">"TXBrowse"</span>, <span style="color: #000000;">0</span> | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL | WS_BORDER | WS_TABSTOP, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">396</span>, <span style="color: #000000;">250</span><br /> CONTROL <span style="color: #ff0000;">"E&xit"</span>, <span style="color: #000000;">62</span>, <span style="color: #ff0000;">"button"</span>, BS_PUSHBUTTON | BS_CENTER | WS_CHILD | WS_VISIBLE, <span style="color: #000000;">196</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">60</span>, <span style="color: #000000;">14</span><br /><span style="color: #000000;">&#125;</span><br /> </div>[/code:2tobw5dc] Image that shows 'Sunday' being shown as 'Su' only [img:2tobw5dc]http&#58;//img232&#46;imageshack&#46;us/img232/6087/sundayw&#46;jpg[/img:2tobw5dc] TIA.
xBrowse - edits of dbf doesn't stick
[quote="hua":3bq87y2s]ii. The combobox displays 'Sunday' as 'Su' only.[/quote:3bq87y2s] [code=fw:3bq87y2s]<div class="fw" id="{CB}" style="font-family: monospace;"> <br />fields person-><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>, person->empno, person->name, person->proxyno, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; person->timeIn, person->timeOut, person->tea_m, person->lunch_min, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; person->tea_a, person->others_min, person->weekend1, person->weekend2, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; person->halfday<br />&nbsp; &nbsp; &nbsp;pictures ,,,replicate<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"9"</span>, len<span style="color: #000000;">&#40;</span>person->proxyno<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">"99:99"</span>,<span style="color: #ff0000;">"99:99"</span>,<span style="color: #ff0000;">"99"</span>,<span style="color: #ff0000;">"99"</span>,<span style="color: #ff0000;">"99"</span>,<span style="color: #ff0000;">"99"</span>,<span style="color: #ff0000;">"99"</span> ;<br />&nbsp;</div>[/code:3bq87y2s] "WeekEnd1" has picture "99"
xBrowse - edits of dbf doesn't stick
Thanks Patrizio. That's an embarrassing mistake <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> . Just shows the more one rush the later will it be finished <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->. Anyone has any answer for the first question? TIA
xBrowse - edits of dbf doesn't stick
Coded the xBrowse part this way [code=fw:1ot27vzb]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; <span style="color: #0000ff;">redefine</span> <span style="color: #0000ff;">xbrowse</span> oBrw <span style="color: #0000ff;">id</span> <span style="color: #000000;">13</span> <span style="color: #0000ff;">of</span> oDlg ;<br />&nbsp; &nbsp; &nbsp;columns <span style="color: #ff0000;">'empno'</span>, <span style="color: #ff0000;">'name'</span>, <span style="color: #ff0000;">'proxyno'</span>, <span style="color: #ff0000;">'timeIn'</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">'timeOut'</span>, <span style="color: #ff0000;">'tea_m'</span>, <span style="color: #ff0000;">'lunch_min'</span>, <span style="color: #ff0000;">'tea_a'</span>, <span style="color: #ff0000;">'others_min'</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">'weekend1'</span>,<span style="color: #ff0000;">'weekend2'</span>, <span style="color: #ff0000;">'halfday'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp;headers <span style="color: #ff0000;">"Code"</span>, <span style="color: #ff0000;">"Name"</span>, <span style="color: #ff0000;">" Proxy Card Number"</span>, <span style="color: #ff0000;">"In"</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"Out"</span>, <span style="color: #ff0000;">"Morning"</span>+CRLF+<span style="color: #ff0000;">"Tea"</span>, <span style="color: #ff0000;">"Lunch"</span>, <span style="color: #ff0000;">"Afternoon"</span>+CRLF+<span style="color: #ff0000;">"Tea"</span>, <span style="color: #ff0000;">"Others"</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"WeekEnd1"</span>, <span style="color: #ff0000;">"WeekEnd2"</span>, <span style="color: #ff0000;">"Half-Day"</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp;pictures ,,replicate<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"9"</span>, len<span style="color: #000000;">&#40;</span>person->proxyno<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">"99:99"</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"99:99"</span>,<span style="color: #ff0000;">"99"</span>,<span style="color: #ff0000;">"99"</span>,<span style="color: #ff0000;">"99"</span>,<span style="color: #ff0000;">"99"</span> ;<br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">alias</span> <span style="color: #ff0000;">'person'</span> fastedit lines cell <span style="color: #B900B9;">//update</span><br /><br />&nbsp; &nbsp; &nbsp;WITH OBJECT oBrw:<span style="color: #000000;">InsCol</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">bEditValue</span> &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> || oBrw:<span style="color: #000000;">KeyNo</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;:<span style="color: #000000;">cEditPicture</span> &nbsp;:= <span style="color: #ff0000;">'9999'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:<span style="color: #000000;">cHeader</span> &nbsp; &nbsp; &nbsp; := <span style="color: #ff0000;">'No'</span><br />&nbsp; &nbsp; &nbsp;END<br />&nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">lAllowColSwapping</span> := .f.<br />&nbsp; &nbsp; &nbsp;AEval<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aCols</span>, <span style="color: #000000;">&#123;</span> |o| o:<span style="color: #000000;">nEditType</span> := EDIT_GET <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bEditValid</span> := <span style="color: #000000;">&#123;</span>|oGet, oCol| verifyTime<span style="color: #000000;">&#40;</span>oGet:<span style="color: #000000;">value</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bEditValid</span> := <span style="color: #000000;">&#123;</span>|oGet, oCol| verifyTime<span style="color: #000000;">&#40;</span>oGet:<span style="color: #000000;">value</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; &nbsp;with object oBrw:<span style="color: #000000;">WeekEnd1</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nEditType</span> &nbsp; &nbsp; &nbsp; &nbsp;:= EDIT_LISTBOX<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">aEditListBound</span> &nbsp; := ;<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">aEditListTxt</span> &nbsp; &nbsp; := aDay<br />&nbsp; &nbsp; &nbsp;end<br /><br />&nbsp; &nbsp; &nbsp;with object oBrw:<span style="color: #000000;">WeekEnd2</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nEditType</span> &nbsp; &nbsp; &nbsp; &nbsp;:= EDIT_LISTBOX<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">aEditListTxt</span> &nbsp; &nbsp; := aDay<br />&nbsp; &nbsp; &nbsp;end<br /><br />&nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">13</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nEditType</span> &nbsp; &nbsp;:= EDIT_LISTBOX<br />&nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">13</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">aEditListTxt</span> := aDay<br /><br /><br />&nbsp; oBrw:<span style="color: #000000;">SetGroupHeader</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Employee"</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">3</span>, oBold<span style="color: #000000;">&#41;</span><br />&nbsp; oBrw:<span style="color: #000000;">SetGroupHeader</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Time"</span>, <span style="color: #000000;">5</span>, <span style="color: #000000;">6</span>, oBold<span style="color: #000000;">&#41;</span><br />&nbsp; oBrw:<span style="color: #000000;">SetGroupHeader</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"In minutes"</span>, <span style="color: #000000;">7</span>, <span style="color: #000000;">10</span>, oBold<span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:1ot27vzb]
xBrowse - error en con los footer y font
Hola a todos: Tengo un problema grave con los footer al usar la clase xbrowse. 1) Lo que sucede es que no reconoce un font de diferente tamaño al que esta definido para el browse. Parte del codigo es el siguiente: [code:1qhix76x] DEFINE FONT aFont&#91;1&#93; NAME "Wingdings" SIZE 0, -32 BOLD DEFINE FONT aFont&#91;2&#93; NAME "Times New Roman" SIZE 0, -16 BOLD &#46;&#46;&#46;&#46; oBrw&#58;lFooter &#58;= &#46;T&#46; oBrw&#58;nFooterLines &#58;= 1 oBrw&#58;aCols&#91;1&#93;&#58;oFooterFont &#58;= aFont&#91; 2 &#93; oBrw&#58;aCols&#91;9&#93;&#58;oFooterFont &#58;= aFont&#91; 2 &#93; oBrw&#58;aCols&#91;1&#93;&#58;cFooter &#58;= "TOTALES $" oBrw&#58;aCols&#91;9&#93;&#58;cFooter &#58;= Transform&#40; nSuma , "@E $ 99,999,999,999" &#41; [/code:1qhix76x] Como ven le asigno el font 2 , pero no lo reconoce. Una imagen de lo que pasa es la siguiente: [url:1qhix76x]http&#58;//img521&#46;imageshack&#46;us/my&#46;php?image=footer2xl9&#46;png[/url:1qhix76x] Antonio será un Bug ?? Lo raro, es que si funcionan los encabezados del xbrowse, con diferentes tipos de font, pero no los footer. Ah, otro dato, estoy usando ventanas MDI, con los footer, no se si esl afectará ?? 2) Otro problema es como se puede evitar el espacio en blanco que queda antes del footer, cuando lo que muestra el browse es de menor tamaño al largo de la ventana. Pienso que una solución sería asignar un color parecido, al de las filas, pero no se como. Alguien me puede decir como le asigno el color de fondo , a la parte no utilizada ??, sin perder los 2 colores que diferencias las filas del browse. A la espera de alguna ayudita, Saludos,
xBrowse - error en con los footer y font
Hola Juan: Contestando a tus dos cuestiones: (1) Sí, es un 'bug', se corrige fácilmente en la clase xBrowse cambiando la línea 3610 del METHOD PaintFooter() donde pone: [code:kpd1hjnl]oFont &#58;= &#58;&#58;oHeaderFont[/code:kpd1hjnl]debe poner: [code:kpd1hjnl]oFont &#58;= &#58;&#58;oFooterFont[/code:kpd1hjnl] (2) Como tú propones puedses asignar color de pintado general al xBrowse igual al de las filas de datos con el método heredado SetColor(), algo así: [code:kpd1hjnl]oBrw&#58;SetColor&#40; CLR_BLACK, nColorDeLasFilas &#41;[/code:kpd1hjnl]y te recomiendo completar el pintado de las líneas verticales poniendo: [code:kpd1hjnl]oBrw&#58; lColDividerComplete &#58;= &#46;t&#46;[/code:kpd1hjnl] También podrías hacer que se autoajustara el alto del xbrowse al necesario para no dejar el espacio que comentas mediante el uso de :: ReSize(), pero esto es un poco mas complicado y necesitaría de ver el código para darte una solución válida. Un saludo, Ramón Avendaño.
xBrowse - error en con los footer y font
Ramón, te agradezco MUCHISIMO tu AYUDA. Estaba bien complicado, con ese error. Y no sabía como hacerlo, muchas gracias de nuevo. Las otras sugerencias, las voy a aaplicar tambien <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> . Saludos,
xBrowse - extractline - speed
function ExtractLine( cText, nFrom ) I found out that if I use instead of nAt := At( CRLF, SubStr( cText, nFrom ) ) nAt := At( CRLF, cText, nFrom ) the speed of the function is much better. Is it save to remove SubStr here? Thanks in advance Otto function ExtractLine( cText, nFrom ) local cLine, nAt nAt := At( CRLF, SubStr( cText, nFrom ) ) if nAt > 0 cLine := Substr( cText, nFrom, nAt - 1 ) nFrom += nAt + 1 else cLine := Substr( cText, nFrom ) nFrom := Len( cText ) + 1 endif return cLine //----------------------------------------------------------------------------//
xBrowse - extractline - speed
[quote:o8bcrw5g]Is it save to remove SubStr here?[/quote:o8bcrw5g] Yes in xHarbour. This extended syntax is not supported by Harbour ( to my knowledge )
xBrowse - frames request
Hi, I have a request to add a new option in xbrowse(). It would me nice that we can add a frame on each cell. For example, if you pass 1 to a variable, the a upper-line is displayed, a 2 a left, 3 upper and left.... I have a planning program, and want to combine some cells. Now I do something like this with bitmaps, but it would be nicer if it was directly in xbrowse. This is how I have it now with the bitmaps.. [img:2s81mo02]http&#58;//www&#46;vms&#46;be/FWTest/XBrowseFramesRequest&#46;jpg[/img:2s81mo02] Regards, Marc
xBrowse - grave problema en borrado de filas con array.
Hola Foro: Tengo un problema grave con el xBrowse, he mirado la clave pero no existe un metodo para borrar una fila determinada del browse, al trabajar con arreglos (ARRAY ). Si hay para borrar columnas, pero no de filas ( rows ). Alguien sabe como solucionar esto, pues no se como hacerlo, he intentado con usar: ADEL( aDatos, oBrw:nArrayAt ) oBrw:SetArray( aDatos, .T. ) // Aqui asigno el nuevo Array oBrw:Refresh( ) Pero cuando refresco el xBrowse, se produce un error de ejecución. Alguien tiene algun ejemplo o forma de corregirlo. Gracias anticipadas, Juan
xBrowse - grave problema en borrado de filas con array.
No es un problema del browse, el problema es de ADEL() [code:25f4lwih] LOCAL aMatriz aMatriz &#58;= &#123; 1, 2, 3 &#125; // Resultado&#58; aMatriz es // ahora &#123; 1, 2, 3 &#125; ADEL&#40;aMatriz, 2&#41; // Resultado&#58; aMatriz es // ahora &#123; 1, 3, NIL &#125; [/code:25f4lwih] Prueba a cambiar la dimension con ASIZE() ASIZE( aMatriz, 2 ) en el ejemplo anterior. Yo lo uso asi: [code:25f4lwih] &#46;&#46;&#46;&#46;&#46; ADEL&#40; aElenco, nPos &#41; ASIZE&#40; aElenco, LEN&#40; aElenco &#41; - 1 &#41; &#46;&#46;&#46;&#46;&#46;&#46; [/code:25f4lwih] Saludos
xBrowse - grave problema en borrado de filas con array.
Hola Pedro, Gracias por tus indicaciones, voy a probarlas. Recibe afectuosos saludos, Juan
xBrowse - grave problema en borrado de filas con array.
Pedro, todo funcionando O.K. ¡¡GRACIAS!! Juan
xBrowse - how to oXbrw:gotop() after header is click?
If user select a header to sort on or change ascending/descending order, how do I get xbrowse to always perform a oXbrw:goTop() afterwards?
xBrowse - how to oXbrw:gotop() after header is click?
[code=fw:3qdafpek]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">bOnSort</span> := <span style="color: #000000;">&#123;</span> |o| o:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span></div>[/code:3qdafpek]
xBrowse - how to oXbrw:gotop() after header is click?
Thanks for the prompt reply Rao. But doesn't seem to work with FWH11.08. I ended up with an extra column called BONSORT
xBrowse - how to oXbrw:gotop() after header is click?
Sorry, FWH11.08 is more than ten year old and did not support this. Let me see the source code of FWH1108 and advise you.
xBrowse - how to oXbrw:gotop() after header is click?
Please try: [code=fw:1cwioc17]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">bLClickHeaders</span> := <span style="color: #000000;">&#123;</span> |r,c,f,o| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> EMPTY<span style="color: #000000;">&#40;</span> o:<span style="color: #000000;">cOrder</span> <span style="color: #000000;">&#41;</span>,,<span style="color: #000000;">&#40;</span>o:<span style="color: #000000;">oBrw</span>:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,o:<span style="color: #000000;">oBrw</span>:<span style="color: #0000ff;">Refresh</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;">&#125;</span> <br />&nbsp;</div>[/code:1cwioc17]
xBrowse - how to oXbrw:gotop() after header is click?
Thank you very much Rao. It works! On another topic, is it possible to get a sorting based on a group of column ? For example, if click on header of col A, sorting is actually col A+col B> TIA
xBrowse - how to oXbrw:gotop() after header is click?
DBF files?
xBrowse - how to oXbrw:gotop() after header is click?
Yes. Is it as simple as creating an index with the expression A+B?
xBrowse - how to oXbrw:gotop() after header is click?
[quote="hua":3w2kdmw5]Yes. Is it as simple as creating an index with the expression A+B?[/quote:3w2kdmw5] Yes, and a little more. Also assign oCol:cSortOrder := <OrderTag> and oCol:cOrdBag := <cOrdBag> // if separate Example (DBFCDX): INDEX ON COLA+COLB TAG IDXAB TO TMP MEMORY oCol:cSortOrder := "IDXAB" oCol:cOrdBag := "TMP"
xBrowse - how to oXbrw:gotop() after header is click?
Thank you very much Rao!
xBrowse - how to update
Hello Daniel, would you be so kind to show me how to update the xbrowse in my special case. I select some rows and press the button to start the function: Backuploeschen(oBrw) But I don’t find an easy way to update the xbrowse. The code below is working but a 2. array seems a little time-consuming. Thanks in advance, Otto [code=fw:320vdwkg]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp;<span style="color: #00C800;">FUNCTION</span> Backuploeschen<span style="color: #000000;">&#40;</span>oBrw<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">local</span> I &nbsp; &nbsp; &nbsp; := <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">local</span> aTemp &nbsp; := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">local</span> nreturn := <span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">For</span> I := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span>aTageSort<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aadd<span style="color: #000000;">&#40;</span> aTemp, <span style="color: #000000;">&#123;</span> &nbsp; aTageSort<span style="color: #000000;">&#91;</span> I <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aTageSort<span style="color: #000000;">&#91;</span> I <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aTageSort<span style="color: #000000;">&#91;</span> I <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aTageSort<span style="color: #000000;">&#91;</span> I <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aTageSort<span style="color: #000000;">&#91;</span> I <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#93;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aTageSort<span style="color: #000000;">&#91;</span> I <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">next</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">for</span> I := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> aTemp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> aTemp<span style="color: #000000;">&#91;</span> I,<span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> = .t.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// &nbsp; &nbsp; &nbsp;DELETEDIR( Setup():cWHBackup + '\' + aTemp[ I ][ 4 ] )</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nreturn := ASCAN<span style="color: #000000;">&#40;</span> aTageSort, <span style="color: #000000;">&#123;</span> |a,b,c,d,e,x| x &nbsp;== aTemp<span style="color: #000000;">&#91;</span> I <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ADel<span style="color: #000000;">&#40;</span> aTageSort, nreturn <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ASize<span style="color: #000000;">&#40;</span> aTageSort, Len<span style="color: #000000;">&#40;</span> aTageSort <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</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; &nbsp; &nbsp; oBrw:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</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; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">next</span><br /><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">msginfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Verzeichnisse gelöscht"</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">//----------------------------------------------------------------------------//</span></div>[/code:320vdwkg] [img:320vdwkg]http&#58;//www&#46;atzwanger-software&#46;com/fw/xbrwupdate&#46;jpg[/img:320vdwkg]