topic
stringlengths
1
63
text
stringlengths
1
577k
posible bug en clausula WHEN de GET (Solucionado)
Buenos Dias Sr. Antonio: Experimento cierto extraño comportamiento al momento de poner clausulas WHEN en dialogo con varios GETS tengo un primer get cuyo VALID llama a otro dialogo y cuando el retorno debe seguir y entrar al segundo get de parada se pasa de largo y si en el siguiente get hay un when perdio totalmente el foco. mi pregunta es posible controlar el comportamiento de clausula WHEN? Muchas gracias por vuestra respuesta. Julio César Gómez Cortéz Godryc Experiencias Lima Perú
posible bug en clausula WHEN de GET (Solucionado)
Julio César, Este ejemplo aqui funciona correctamente. Puedes probarlo ? [code=fw:2fla1rc1]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, c1 := Space<span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span>, c2 := Space<span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span>, c3 := Space<span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">GET</span> c1 <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">VALID</span> Segundo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">2</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">GET</span> c2 <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">VALID</span> Segundo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">3</span>, <span style="color: #000000;">1</span> <span style="color: #0000ff;">GET</span> c3 <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">VALID</span> Segundo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">WHEN</span> .T.<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> Segundo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br />&nbsp; &nbsp;<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;<br /><span style="color: #00C800;">return</span> .T. &nbsp;</div>[/code:2fla1rc1]
posible bug en clausula WHEN de GET (Solucionado)
Buenos Dias Sr. Antonio: La Rutina que me congela el dialogo: [code=fw:hbm126h5]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br />MEMVAR k01,k02,k03,k04,k05,k06,k07,k08,k09,k10<br />MEMVAR k11,k12,k13,k14,k15,k16,k17,k18,k19,k20<br />MEMVAR k21,k22,k23<br />MEMVAR kvf3<br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> DiProb,GeProb<br />   SetGetColorFocus<span style="color: #000000;">&#40;</span> RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">247</span>,<span style="color: #000000;">208</span>,<span style="color: #000000;">136</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   STOR SPAC<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">TO</span> k07,k08,k23<br />   k15=SPAC<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><br />   STOR SPAC<span style="color: #000000;">&#40;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">TO</span> k03,k16<br />   k01=SPAC<span style="color: #000000;">&#40;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#41;</span><br />   k06=SPAC<span style="color: #000000;">&#40;</span><span style="color: #000000;">7</span><span style="color: #000000;">&#41;</span><br />   k17=SPAC<span style="color: #000000;">&#40;</span><span style="color: #000000;">8</span><span style="color: #000000;">&#41;</span><br />   STOR SPAC<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">TO</span> k04,k05<br />   k09=SPAC<span style="color: #000000;">&#40;</span><span style="color: #000000;">28</span><span style="color: #000000;">&#41;</span><br />   STOR SPAC<span style="color: #000000;">&#40;</span><span style="color: #000000;">50</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">TO</span> k02,k10<br />   STOR <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> k11,k12,k13,k14,k18,k19,k20,k21,k22<br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> DiProb <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">'#2003'</span><br />      <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> GeProb <span style="color: #0000ff;">VAR</span> k01 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">201</span> <span style="color: #0000ff;">OF</span> DiProb <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">'999999'</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">VALID</span> Segu<span style="color: #000000;">&#40;</span>DiProb<span style="color: #000000;">&#41;</span><br />      <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> GeProb <span style="color: #0000ff;">VAR</span> k02 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">202</span> <span style="color: #0000ff;">OF</span> DiProb <span style="color: #0000ff;">UPDATE</span><br />      <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> GeProb <span style="color: #0000ff;">VAR</span> k03 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">203</span> <span style="color: #0000ff;">OF</span> DiProb <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">'999!'</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">WHEN</span> k03=SPAC<span style="color: #000000;">&#40;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">VALID</span> Terc<span style="color: #000000;">&#40;</span>DiProb<span style="color: #000000;">&#41;</span><br />      <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> GeProb <span style="color: #0000ff;">VAR</span> k04 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">204</span> <span style="color: #0000ff;">OF</span> DiProb <span style="color: #0000ff;">UPDATE</span><br />      <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> GeProb <span style="color: #0000ff;">VAR</span> k05 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">205</span> <span style="color: #0000ff;">OF</span> DiProb <span style="color: #0000ff;">UPDATE</span><br />      <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> GeProb <span style="color: #0000ff;">VAR</span> k06 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">206</span> <span style="color: #0000ff;">OF</span> DiProb <span style="color: #0000ff;">UPDATE</span><br />      <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> GeProb <span style="color: #0000ff;">VAR</span> k07 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">207</span> <span style="color: #0000ff;">OF</span> DiProb <span style="color: #0000ff;">UPDATE</span><br />      <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> GeProb <span style="color: #0000ff;">VAR</span> k08 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">208</span> <span style="color: #0000ff;">OF</span> DiProb <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">'9'</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">WHEN</span> k08=SPAC<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> GeProb <span style="color: #0000ff;">VAR</span> k09 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">209</span> <span style="color: #0000ff;">OF</span> DiProb <span style="color: #0000ff;">UPDATE</span><br />      <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> GeProb <span style="color: #0000ff;">VAR</span> k10 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">210</span> <span style="color: #0000ff;">OF</span> DiProb <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">WHEN</span> k08=<span style="color: #ff0000;">'4'</span> .AND. k10=SPAC<span style="color: #000000;">&#40;</span><span style="color: #000000;">50</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> GeProb <span style="color: #0000ff;">VAR</span> k11 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">211</span> <span style="color: #0000ff;">OF</span> DiProb <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">'9999'</span> <span style="color: #0000ff;">UPDATE</span><br />      <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> GeProb <span style="color: #0000ff;">VAR</span> k12 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">212</span> <span style="color: #0000ff;">OF</span> DiProb <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">'9999'</span> <span style="color: #0000ff;">UPDATE</span><br />      <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> GeProb <span style="color: #0000ff;">VAR</span> k13 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">213</span> <span style="color: #0000ff;">OF</span> DiProb <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">'9999'</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">WHEN</span> k19==<span style="color: #000000;">0</span> <br />      <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> GeProb <span style="color: #0000ff;">VAR</span> k14 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">214</span> <span style="color: #0000ff;">OF</span> DiProb <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">'9999'</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">WHEN</span> k19==<span style="color: #000000;">0</span><br />      <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> GeProb <span style="color: #0000ff;">VAR</span> k15 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">215</span> <span style="color: #0000ff;">OF</span> DiProb <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">'@!'</span> <span style="color: #0000ff;">UPDATE</span><br />      <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> GeProb <span style="color: #0000ff;">VAR</span> k16 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">216</span> <span style="color: #0000ff;">OF</span> DiProb <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">'9999'</span> <span style="color: #0000ff;">UPDATE</span><br />      <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> GeProb <span style="color: #0000ff;">VAR</span> k17 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">217</span> <span style="color: #0000ff;">OF</span> DiProb <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">'99999999'</span> <span style="color: #0000ff;">UPDATE</span><br />      <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> GeProb <span style="color: #0000ff;">VAR</span> k18 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">218</span> <span style="color: #0000ff;">OF</span> DiProb <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">'9999'</span> <span style="color: #0000ff;">UPDATE</span><br />      <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> GeProb <span style="color: #0000ff;">VAR</span> k19 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">219</span> <span style="color: #0000ff;">OF</span> DiProb <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">'9999'</span> <span style="color: #0000ff;">UPDATE</span><br />      <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> GeProb <span style="color: #0000ff;">VAR</span> k20 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">220</span> <span style="color: #0000ff;">OF</span> DiProb <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">'9999'</span> <span style="color: #0000ff;">UPDATE</span><br />      <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> GeProb <span style="color: #0000ff;">VAR</span> k21 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">221</span> <span style="color: #0000ff;">OF</span> DiProb <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">'9999'</span> <span style="color: #0000ff;">UPDATE</span><br />      <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> GeProb <span style="color: #0000ff;">VAR</span> k22 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">222</span> <span style="color: #0000ff;">OF</span> DiProb <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">'9999'</span> <span style="color: #0000ff;">UPDATE</span><br />      <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> GeProb <span style="color: #0000ff;">VAR</span> k23 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">223</span> <span style="color: #0000ff;">OF</span> DiProb <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">'9'</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">WHEN</span> <span style="color: #0000ff;">ROUND</span><span style="color: #000000;">&#40;</span>k22,<span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span>><span style="color: #000000;">0.00</span><br />      <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">301</span> <span style="color: #0000ff;">OF</span> DiProb<br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> DiProb<br />RETU <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Segu<span style="color: #000000;">&#40;</span>DiProb<span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> DiSegu<br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> DiSegu<br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> DiSegu<br />   k01=<span style="color: #ff0000;">'000001'</span><br />   k02=<span style="color: #ff0000;">'Soy un nuevo alumno'</span><br />   DiProb:<span style="color: #0000ff;">Update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />RETU .T.<br /><br /><span style="color: #00C800;">FUNCTION</span> Terc<span style="color: #000000;">&#40;</span>DiProb<span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> DiTerc<br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> DiTerc<br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> DiTerc<br />   k03=<span style="color: #ff0000;">'113A'</span><br />   k04=<span style="color: #ff0000;">'DIURNO'</span><br />   k05=<span style="color: #ff0000;">'INICIAL'</span><br />   k06=<span style="color: #ff0000;">'3 AÑOS'</span><br />   k07=<span style="color: #ff0000;">'A'</span><br />   k08=<span style="color: #ff0000;">'1'</span><br />   k09=<span style="color: #ff0000;">'Nuevo'</span><br />   DiProb:<span style="color: #0000ff;">Update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />RETU .T.<br /> </div>[/code:hbm126h5] y el recurso es : [code=fw:hbm126h5]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// RESOURCE SCRIPT generated by "Pelles C for Windows, version 7.00".</span><br /><br /><span style="color: #00D7D7;">#include</span> <windows.h><br /><span style="color: #00D7D7;">#include</span> <commctrl.h><br /><span style="color: #00D7D7;">#include</span> <richedit.h><br /><br />LANGUAGE LANG_SPANISH,SUBLANG_SPANISH_PERU<br /><br /><span style="color: #000000;">2003</span> DIALOGEX DISCARDABLE <span style="color: #000000;">14</span>, <span style="color: #000000;">68</span>, <span style="color: #000000;">353</span>, <span style="color: #000000;">222</span><br /><span style="color: #0000ff;">STYLE</span> DS_SHELLFONT|WS_POPUP|WS_VISIBLE<br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"Tahoma"</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">1</span><br /><span style="color: #000000;">&#123;</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">401</span>, <span style="color: #ff0000;">"Static"</span>, SS_GRAYFRAME|SS_CENTERIMAGE, <span style="color: #000000;">4</span>, <span style="color: #000000;">4</span>, <span style="color: #000000;">344</span>, <span style="color: #000000;">16</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">402</span>, <span style="color: #ff0000;">"Static"</span>, SS_GRAYFRAME|SS_CENTERIMAGE, <span style="color: #000000;">4</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">60</span>, <span style="color: #000000;">16</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">403</span>, <span style="color: #ff0000;">"Static"</span>, SS_GRAYFRAME|SS_CENTERIMAGE, <span style="color: #000000;">64</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">68</span>, <span style="color: #000000;">16</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">404</span>, <span style="color: #ff0000;">"Static"</span>, SS_GRAYFRAME|SS_CENTERIMAGE, <span style="color: #000000;">132</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">72</span>, <span style="color: #000000;">16</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">405</span>, <span style="color: #ff0000;">"Static"</span>, SS_GRAYFRAME|SS_CENTERIMAGE, <span style="color: #000000;">204</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">68</span>, <span style="color: #000000;">16</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">406</span>, <span style="color: #ff0000;">"Static"</span>, SS_GRAYFRAME|SS_CENTERIMAGE, <span style="color: #000000;">272</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">56</span>, <span style="color: #000000;">16</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">407</span>, <span style="color: #ff0000;">"Static"</span>, SS_GRAYFRAME|SS_CENTERIMAGE, <span style="color: #000000;">328</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">16</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">408</span>, <span style="color: #ff0000;">"Static"</span>, SS_GRAYFRAME|SS_CENTERIMAGE, <span style="color: #000000;">4</span>, <span style="color: #000000;">36</span>, <span style="color: #000000;">156</span>, <span style="color: #000000;">16</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">409</span>, <span style="color: #ff0000;">"Static"</span>, SS_GRAYFRAME|SS_CENTERIMAGE, <span style="color: #000000;">160</span>, <span style="color: #000000;">36</span>, <span style="color: #000000;">188</span>, <span style="color: #000000;">16</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">410</span>, <span style="color: #ff0000;">"Static"</span>, SS_GRAYFRAME|SS_CENTERIMAGE, <span style="color: #000000;">4</span>, <span style="color: #000000;">52</span>, <span style="color: #000000;">52</span>, <span style="color: #000000;">32</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">411</span>, <span style="color: #ff0000;">"Static"</span>, SS_GRAYFRAME|SS_CENTERIMAGE, <span style="color: #000000;">56</span>, <span style="color: #000000;">52</span>, <span style="color: #000000;">84</span>, <span style="color: #000000;">16</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">412</span>, <span style="color: #ff0000;">"Static"</span>, SS_GRAYFRAME|SS_CENTERIMAGE, <span style="color: #000000;">140</span>, <span style="color: #000000;">52</span>, <span style="color: #000000;">28</span>, <span style="color: #000000;">32</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">413</span>, <span style="color: #ff0000;">"Static"</span>, SS_GRAYFRAME|SS_CENTERIMAGE, <span style="color: #000000;">168</span>, <span style="color: #000000;">52</span>, <span style="color: #000000;">84</span>, <span style="color: #000000;">32</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">414</span>, <span style="color: #ff0000;">"Static"</span>, SS_GRAYFRAME|SS_CENTERIMAGE, <span style="color: #000000;">252</span>, <span style="color: #000000;">52</span>, <span style="color: #000000;">96</span>, <span style="color: #000000;">16</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">415</span>, <span style="color: #ff0000;">"Static"</span>, SS_GRAYFRAME|SS_CENTERIMAGE, <span style="color: #000000;">56</span>, <span style="color: #000000;">68</span>, <span style="color: #000000;">84</span>, <span style="color: #000000;">16</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">416</span>, <span style="color: #ff0000;">"Static"</span>, SS_GRAYFRAME|SS_CENTERIMAGE, <span style="color: #000000;">252</span>, <span style="color: #000000;">68</span>, <span style="color: #000000;">96</span>, <span style="color: #000000;">16</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">417</span>, <span style="color: #ff0000;">"Static"</span>, SS_GRAYFRAME|SS_CENTERIMAGE, <span style="color: #000000;">4</span>, <span style="color: #000000;">84</span>, <span style="color: #000000;">112</span>, <span style="color: #000000;">16</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">418</span>, <span style="color: #ff0000;">"Static"</span>, SS_GRAYFRAME|SS_CENTERIMAGE, <span style="color: #000000;">116</span>, <span style="color: #000000;">84</span>, <span style="color: #000000;">88</span>, <span style="color: #000000;">16</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">419</span>, <span style="color: #ff0000;">"Static"</span>, SS_GRAYFRAME|SS_CENTERIMAGE, <span style="color: #000000;">204</span>, <span style="color: #000000;">84</span>, <span style="color: #000000;">60</span>, <span style="color: #000000;">16</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">420</span>, <span style="color: #ff0000;">"Static"</span>, SS_GRAYFRAME|SS_CENTERIMAGE, <span style="color: #000000;">264</span>, <span style="color: #000000;">84</span>, <span style="color: #000000;">84</span>, <span style="color: #000000;">16</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">421</span>, <span style="color: #ff0000;">"Static"</span>, SS_GRAYFRAME|SS_CENTERIMAGE, <span style="color: #000000;">4</span>, <span style="color: #000000;">108</span>, <span style="color: #000000;">56</span>, <span style="color: #000000;">48</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">422</span>, <span style="color: #ff0000;">"Static"</span>, SS_GRAYFRAME|SS_CENTERIMAGE, <span style="color: #000000;">60</span>, <span style="color: #000000;">108</span>, <span style="color: #000000;">84</span>, <span style="color: #000000;">16</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">423</span>, <span style="color: #ff0000;">"Static"</span>, SS_GRAYFRAME|SS_CENTERIMAGE, <span style="color: #000000;">180</span>, <span style="color: #000000;">108</span>, <span style="color: #000000;">68</span>, <span style="color: #000000;">48</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">424</span>, <span style="color: #ff0000;">"Static"</span>, SS_GRAYFRAME|SS_CENTERIMAGE, <span style="color: #000000;">248</span>, <span style="color: #000000;">108</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">16</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">425</span>, <span style="color: #ff0000;">"Static"</span>, SS_GRAYFRAME|SS_CENTERIMAGE, <span style="color: #000000;">60</span>, <span style="color: #000000;">124</span>, <span style="color: #000000;">84</span>, <span style="color: #000000;">16</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">426</span>, <span style="color: #ff0000;">"Static"</span>, SS_GRAYFRAME|SS_CENTERIMAGE, <span style="color: #000000;">248</span>, <span style="color: #000000;">124</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">16</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">427</span>, <span style="color: #ff0000;">"Static"</span>, SS_GRAYFRAME|SS_CENTERIMAGE, <span style="color: #000000;">60</span>, <span style="color: #000000;">140</span>, <span style="color: #000000;">84</span>, <span style="color: #000000;">16</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">428</span>, <span style="color: #ff0000;">"Static"</span>, SS_GRAYFRAME|SS_CENTERIMAGE, <span style="color: #000000;">248</span>, <span style="color: #000000;">140</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">16</span><br />  CONTROL <span style="color: #ff0000;">"Alumno :"</span>, <span style="color: #000000;">101</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">8</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">30</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">"Salon :"</span>, <span style="color: #000000;">102</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">8</span>, <span style="color: #000000;">24</span>, <span style="color: #000000;">24</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">"Turno :"</span>, <span style="color: #000000;">103</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">68</span>, <span style="color: #000000;">24</span>, <span style="color: #000000;">24</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">"Nivel :"</span>, <span style="color: #000000;">104</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">136</span>, <span style="color: #000000;">24</span>, <span style="color: #000000;">22</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">"Grado :"</span>, <span style="color: #000000;">105</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">208</span>, <span style="color: #000000;">24</span>, <span style="color: #000000;">25</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">"Sección :"</span>, <span style="color: #000000;">106</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">276</span>, <span style="color: #000000;">24</span>, <span style="color: #000000;">32</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">"Situación :"</span>, <span style="color: #000000;">107</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">8</span>, <span style="color: #000000;">40</span>, <span style="color: #000000;">35</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">"Procedencia :"</span>, <span style="color: #000000;">108</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">164</span>, <span style="color: #000000;">40</span>, <span style="color: #000000;">45</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">"Tarifa Inicial :"</span>, <span style="color: #000000;">109</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">8</span>, <span style="color: #000000;">56</span>, <span style="color: #000000;">43</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">"Matricula S/."</span>, <span style="color: #000000;">110</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">60</span>, <span style="color: #000000;">56</span>, <span style="color: #000000;">42</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">"Pension S/."</span>, <span style="color: #000000;">111</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">60</span>, <span style="color: #000000;">72</span>, <span style="color: #000000;">42</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">"Descuento Concedido :"</span>, <span style="color: #000000;">112</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">172</span>, <span style="color: #000000;">56</span>, <span style="color: #000000;">76</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">"Por Matricula S/."</span>, <span style="color: #000000;">113</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">256</span>, <span style="color: #000000;">56</span>, <span style="color: #000000;">55</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">"Por Pension S/."</span>, <span style="color: #000000;">114</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">256</span>, <span style="color: #000000;">72</span>, <span style="color: #000000;">55</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">"Comprobante de Pago Emitido :"</span>, <span style="color: #000000;">115</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">8</span>, <span style="color: #000000;">88</span>, <span style="color: #000000;">101</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">"Tipo Documento :"</span>, <span style="color: #000000;">116</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">120</span>, <span style="color: #000000;">88</span>, <span style="color: #000000;">57</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">"Serie :"</span>, <span style="color: #000000;">117</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">208</span>, <span style="color: #000000;">88</span>, <span style="color: #000000;">22</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">"Número :"</span>, <span style="color: #000000;">118</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">268</span>, <span style="color: #000000;">88</span>, <span style="color: #000000;">30</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">"Transacción :"</span>, <span style="color: #000000;">119</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">8</span>, <span style="color: #000000;">112</span>, <span style="color: #000000;">45</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">"Importe S/."</span>, <span style="color: #000000;">120</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">64</span>, <span style="color: #000000;">112</span>, <span style="color: #000000;">43</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">"A Cuenta S/."</span>, <span style="color: #000000;">121</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">64</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">43</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">"Resta S/."</span>, <span style="color: #000000;">122</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">64</span>, <span style="color: #000000;">144</span>, <span style="color: #000000;">43</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">"Detalle de Cobro :"</span>, <span style="color: #000000;">123</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">184</span>, <span style="color: #000000;">112</span>, <span style="color: #000000;">58</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">"Pago Caja S/."</span>, <span style="color: #000000;">124</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">252</span>, <span style="color: #000000;">112</span>, <span style="color: #000000;">60</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">"Vuelto S/."</span>, <span style="color: #000000;">125</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">252</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">60</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">"[1]Créd [2]Redo :"</span>, <span style="color: #000000;">126</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">252</span>, <span style="color: #000000;">144</span>, <span style="color: #000000;">60</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">201</span>, <span style="color: #ff0000;">"Edit"</span>, WS_TABSTOP, <span style="color: #000000;">40</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">30</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">202</span>, <span style="color: #ff0000;">"Edit"</span>, 0x00000000, <span style="color: #000000;">76</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">268</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">203</span>, <span style="color: #ff0000;">"Edit"</span>, WS_TABSTOP, <span style="color: #000000;">36</span>, <span style="color: #000000;">24</span>, <span style="color: #000000;">24</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">204</span>, <span style="color: #ff0000;">"Edit"</span>, 0x00000000, <span style="color: #000000;">96</span>, <span style="color: #000000;">24</span>, <span style="color: #000000;">32</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">205</span>, <span style="color: #ff0000;">"Edit"</span>, 0x00000000, <span style="color: #000000;">160</span>, <span style="color: #000000;">24</span>, <span style="color: #000000;">40</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">206</span>, <span style="color: #ff0000;">"Edit"</span>, 0x00000000, <span style="color: #000000;">236</span>, <span style="color: #000000;">24</span>, <span style="color: #000000;">30</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">207</span>, <span style="color: #ff0000;">"Edit"</span>, 0x00000000, <span style="color: #000000;">312</span>, <span style="color: #000000;">24</span>, <span style="color: #000000;">12</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">208</span>, <span style="color: #ff0000;">"Edit"</span>, WS_TABSTOP, <span style="color: #000000;">48</span>, <span style="color: #000000;">40</span>, <span style="color: #000000;">12</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">209</span>, <span style="color: #ff0000;">"Edit"</span>, 0x00000000, <span style="color: #000000;">64</span>, <span style="color: #000000;">40</span>, <span style="color: #000000;">90</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">210</span>, <span style="color: #ff0000;">"Edit"</span>, WS_TABSTOP, <span style="color: #000000;">212</span>, <span style="color: #000000;">40</span>, <span style="color: #000000;">132</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">211</span>, <span style="color: #ff0000;">"Edit"</span>, 0x00000000, <span style="color: #000000;">108</span>, <span style="color: #000000;">56</span>, <span style="color: #000000;">25</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">212</span>, <span style="color: #ff0000;">"Edit"</span>, 0x00000000, <span style="color: #000000;">108</span>, <span style="color: #000000;">72</span>, <span style="color: #000000;">25</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">213</span>, <span style="color: #ff0000;">"Edit"</span>, WS_TABSTOP, <span style="color: #000000;">316</span>, <span style="color: #000000;">56</span>, <span style="color: #000000;">25</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">214</span>, <span style="color: #ff0000;">"Edit"</span>, WS_TABSTOP, <span style="color: #000000;">316</span>, <span style="color: #000000;">72</span>, <span style="color: #000000;">25</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">215</span>, <span style="color: #ff0000;">"Edit"</span>, WS_TABSTOP, <span style="color: #000000;">184</span>, <span style="color: #000000;">88</span>, <span style="color: #000000;">16</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">216</span>, <span style="color: #ff0000;">"Edit"</span>, WS_TABSTOP, <span style="color: #000000;">232</span>, <span style="color: #000000;">88</span>, <span style="color: #000000;">25</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">217</span>, <span style="color: #ff0000;">"Edit"</span>, WS_TABSTOP, <span style="color: #000000;">300</span>, <span style="color: #000000;">88</span>, <span style="color: #000000;">40</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">218</span>, <span style="color: #ff0000;">"Edit"</span>, 0x00000000, <span style="color: #000000;">112</span>, <span style="color: #000000;">112</span>, <span style="color: #000000;">25</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">219</span>, <span style="color: #ff0000;">"Edit"</span>, 0x00000000, <span style="color: #000000;">112</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">25</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">220</span>, <span style="color: #ff0000;">"Edit"</span>, 0x00000000, <span style="color: #000000;">112</span>, <span style="color: #000000;">144</span>, <span style="color: #000000;">25</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">221</span>, <span style="color: #ff0000;">"Edit"</span>, 0x00000000, <span style="color: #000000;">316</span>, <span style="color: #000000;">112</span>, <span style="color: #000000;">25</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">222</span>, <span style="color: #ff0000;">"Edit"</span>, 0x00000000, <span style="color: #000000;">316</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">25</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">223</span>, <span style="color: #ff0000;">"Edit"</span>, WS_TABSTOP, <span style="color: #000000;">316</span>, <span style="color: #000000;">144</span>, <span style="color: #000000;">16</span>, <span style="color: #000000;">8</span><br />  CONTROL <span style="color: #ff0000;">"Registrar"</span>, <span style="color: #000000;">301</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">152</span>, <span style="color: #000000;">172</span>, <span style="color: #000000;">48</span>, <span style="color: #000000;">16</span><br /><span style="color: #000000;">&#125;</span><br /> </div>[/code:hbm126h5] Saludos Julio César Gómez Cortéz Godryc Experiencias Lima Perú
posible bug en clausula WHEN de GET (Solucionado)
[code=fw:aob43o4n]<div class="fw" id="{CB}" style="font-family: monospace;"><br />Borland <span style="color: #0000ff;">Resource</span> Compiler &nbsp;Version <span style="color: #000000;">5.40</span><br />Copyright <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> <span style="color: #000000;">1990</span>, <span style="color: #000000;">1999</span> Inprise Corporation. &nbsp;All rights reserved.<br /><br />Error congela.RC <span style="color: #000000;">14</span> <span style="color: #000000;">25</span>: <span style="color: #000000;">Expecting</span> BEGIN<br />&nbsp;</div>[/code:aob43o4n]
posible bug en clausula WHEN de GET (Solucionado)
Cual de esos GETs es el que te da el problema ?
posible bug en clausula WHEN de GET (Solucionado)
El problema surge cuando salgo del valid en el tercer GET (segundo tabstop) "salon" y lo que he apreciado es que Fivewin 1 Marca el siguiente tabstop antes de abrir el tercer dialogo 2 Cuando regresa y la siguiente variable no ha cambiado internamente en su valor SI se posiciona en el siguiente Get con tabstop (el que marcó antes) 3 Cuando regresa y la siguiente variable si ha cambiado internamente en su valor el When no permite la entrada 4 En el caso 3 esperaba que el When, dado que no permite la entrada, obligue al dialogo a que pase a leer el siguiente tabstop disponible, y entonces, me di con la sorpresa que la no permision rebota hacia el valid del get anterior haciendo repetir la operacion interna (lo que me duplicaba acumulacion de valores en variables) y congelando el dialogo.
posible bug en clausula WHEN de GET (Solucionado)
Intenta proporcionar un ejemplo que reproduzca el problema
posible bug en clausula WHEN de GET (Solucionado)
Sr. Antonio: Solucione el problema quitando las clausulas WHEN en todos los GETS con TABSTOP cuyas variables podrían cambiar su valor internamente y Redirigiendo el foco directamente al próximo GET donde debería detenerse. Muchas gracias por su atención!! Saludos Julio César Gómez Cortéz Godryc Experiencias Lima Perú
posible bug en clausula WHEN de GET (Solucionado)
Julio Cesar el problema puede que sea la sobrecarga del "=", como bien sabes vale para asignar y para comparar... Desde la epoca de clipper 5.3 yo me he acostumbrado a usar ":=" para asignar y "==" para comparar, de este modo te quitas de muchos problemas <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> prueba a cambiar REDEFINE GET GeProb VAR k03 ID 203 OF DiProb PICTURE '999!' UPDATE WHEN k03=SPAC(4) VALID Terc(DiProb) por REDEFINE GET GeProb VAR k03 ID 203 OF DiProb PICTURE '999!' UPDATE WHEN k03==SPAC(4) VALID Terc(DiProb) salvo que quisieras asignar espacios a k03, si es asi cambia a esto REDEFINE GET GeProb VAR k03 ID 203 OF DiProb PICTURE '999!' UPDATE WHEN ( k03:=SPAC(4), .t. ) VALID Terc(DiProb) lo demás cambialo en ese sentido... Aunque tarde espero haberte aclarado algo <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> <!-- s:roll: --><img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" /><!-- s:roll: --> PD: para saber si un valor está vacio es mejor usar la funcion empty( k03 ), quedaria de esta manera así: REDEFINE GET GeProb VAR k03 ID 203 OF DiProb PICTURE '999!' UPDATE WHEN empty( k03 ) VALID Terc(DiProb)
posible cambio en el browse
Cuando se inicializa se usa : ::bLogicLen = { || ( ::cAlias )->( RecCount() ) } pero si se usan indices o scopes lo suyo seria usar : ::bLogicLen = { || ( ::cAlias )->( OrdKeyCount() ) } Saludos.
posible cambio en el browse
Manuel, Cierto, gracias! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
posible fallo de harbour para fivemac
No se si soy yo o es un error de harbour pero me tiene parado . Si alguien lo puede mirasr a ver .... es simple , es el manejo de los indices supongamos este codigo : local cFamilia:="familia" Use Familia Alias (cFamilia) NEW SHARED VIA "DBFCDX" (cFamilia)->(ordsetfocus(1)) Me deja el orden natural pasando de la orden Ordsetfocus(). ¿ Está mal la sintaxis ? Saludos.
posible fallo de harbour para fivemac
Olvidaros . Mia culpa . Resulta que al realizar los indices se me olvidó incluir la clausula VIA "DBFCDX" por lo que realizó los indices ntx . Luego intentaba abrirlos cdx que no existian . <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> <!-- s:evil: --><img src="{SMILIES_PATH}/icon_evil.gif" alt=":evil:" title="Evil or Very Mad" /><!-- s:evil: --> Me ha tenido parado la tonteria mas de 4 horas . Saludos.
posible mejora al methodo cgenprg() en Twindow
Para poder declarar los controles como locales se puede hacer estos cambios : [code=fw:5zrq5023]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />  <span style="color: #00C800;">if</span> ::<span style="color: #000000;">oBar</span> != <span style="color: #00C800;">nil</span><br />      cPrg += <span style="color: #ff0000;">"   local oBart "</span> + CRLF<br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #B900B9;">//------------------- añadir ----------------------------------------</span><br />   <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aControls</span> <span style="color: #000000;">&#41;</span><br />      cPrg += <span style="color: #ff0000;">"   local aObj:= array("</span>+AllTrim<span style="color: #000000;">&#40;</span>str<span style="color: #000000;">&#40;</span>Len<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">aControls</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">")"</span>+CRLF<br />&nbsp; &nbsp; &nbsp; cPrg += <span style="color: #ff0000;">"   &nbsp;local aVar:= array("</span>+AllTrim<span style="color: #000000;">&#40;</span>str<span style="color: #000000;">&#40;</span>Len<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">aControls</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">")"</span>+CRLF<br />   <span style="color: #00C800;">endif</span><br /><span style="color: #B900B9;">//----------------- end añadir ----------------------------------------</span><br /><br /> </div>[/code:5zrq5023] luego al procesar los controles : [code=fw:5zrq5023]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />   <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aControls</span> <span style="color: #000000;">&#41;</span><br />      cPrg += CRLF<br />      AEval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aControls</span>, <span style="color: #000000;">&#123;</span> | oCtrl,nindex | cPrg += oCtrl:<span style="color: #000000;">cGenPRG</span><span style="color: #000000;">&#40;</span> lDlgUnits,nindex <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span>   <span style="color: #B900B9;">// añadir nindex a todos los controles .....</span><br />   <span style="color: #00C800;">endif</span><br /><br /><br /> </div>[/code:5zrq5023] Mejora a tbmp añadiendo el methodo cgenprg() [code=fw:5zrq5023]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">METHOD</span> cGenPRG<span style="color: #000000;">&#40;</span> lDlgUnits,nindex <span style="color: #000000;">&#41;</span>   <span style="color: #00C800;">CLASS</span> TBitmap<br /><br />   <span style="color: #00C800;">local</span> nFactorX, nFactorY<br />   <span style="color: #00C800;">local</span> cTop, cLeft, cWidth, cHeight<br />   <span style="color: #00C800;">local</span> cCode<br />   <span style="color: #00C800;">local</span> cBmpCode<br /><br />   <span style="color: #00C800;">DEFAULT</span> lDlgUnits := .F.<br />   <span style="color: #00C800;">DEFAULT</span> nindex:= <span style="color: #000000;">1</span><br /><br />   nFactorX = <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lDlgUnits, <span style="color: #000000;">4</span> / nLoWord<span style="color: #000000;">&#40;</span> GetDlgBaseUnits<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />   nFactorY = <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lDlgUnits, <span style="color: #000000;">8</span> / nHiWord<span style="color: #000000;">&#40;</span> GetDlgBaseUnits<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br /><br />   ::<span style="color: #000000;">CoorsUpdate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   cTop    = LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> Int<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nTop</span> * nFactorX   <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   cLeft   = LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> Int<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nLeft</span> *nFactorY <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   cWidth  = LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> INT <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nWidth</span> *  nFactorX    <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />   cHeight = LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> INT <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nHeight</span> *nFactorY<span style="color: #000000;">&#41;</span>  <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /> <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cResName</span> <span style="color: #000000;">&#41;</span><br />      cBmpCode:=  <span style="color: #ff0000;">' RESNAME "'</span> + ::<span style="color: #000000;">cResName</span>+ <span style="color: #ff0000;">' " '</span><br />   <span style="color: #00C800;">else</span><br />      cBmpCode:=  <span style="color: #ff0000;">' FILENAME "'</span> + ::<span style="color: #000000;">cBmpFile</span>+<span style="color: #ff0000;">' " '</span><br />   <span style="color: #00C800;">endif</span><br /><br />   cCode := CRLF + <span style="color: #ff0000;">"   @ "</span> + cTop + <span style="color: #ff0000;">", "</span> + ;<br />                  cLeft + <span style="color: #ff0000;">' BITMAP aObj['</span>+alltrim<span style="color: #000000;">&#40;</span>str<span style="color: #000000;">&#40;</span>nindex<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">']'</span>+cBmpcode + ;<br />                  <span style="color: #ff0000;">' SIZE '</span> + cwidth + <span style="color: #ff0000;">", "</span> + cHeight + <span style="color: #ff0000;">" ADJUST NOBORDER PIXEL OF oWnd"</span> + CRLF<br /><br />  <br />   <span style="color: #00C800;">Return</span> cCode<br /><br /> </div>[/code:5zrq5023]
posible mejora al methodo cgenprg() en Twindow
añado mejora en metodo cgenprg de tSay con control de unidades en los dialogos: [code=fw:1d5jloq4]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">METHOD</span> cGenPrg<span style="color: #000000;">&#40;</span>lDlgUnits,nindex <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TSay<br /><br />   <span style="color: #00C800;">local</span> nFactorX, nFactorY<br />   <span style="color: #00C800;">local</span> cTop, cLeft, cWidth, cHeight<br />   <span style="color: #00C800;">local</span> cCode := <span style="color: #ff0000;">""</span><br /><br />   <span style="color: #00C800;">DEFAULT</span> lDlgUnits := .F.<br />   <span style="color: #00C800;">DEFAULT</span> nindex:= <span style="color: #000000;">1</span><br /><br />   nFactorX = <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lDlgUnits, <span style="color: #000000;">4</span> / nLoWord<span style="color: #000000;">&#40;</span> GetDlgBaseUnits<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />   nFactorY = <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lDlgUnits, <span style="color: #000000;">8</span> / nHiWord<span style="color: #000000;">&#40;</span> GetDlgBaseUnits<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br /><br />   ::<span style="color: #000000;">CoorsUpdate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   cTop    = LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> Int<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nTop</span>    * nFactorX <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   cLeft   = LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> Int<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nLeft</span>   * nFactorY <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   cWidth  = LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> Int<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nRight</span> - ::<span style="color: #000000;">nTop</span> <span style="color: #000000;">&#41;</span> * nFactorY <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   cHeight = LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> Int<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nBottom</span> - ::<span style="color: #000000;">nTop</span> <span style="color: #000000;">&#41;</span>* nFactorX <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><br />    cCode := CRLF + <span style="color: #ff0000;">"   @ "</span> + cTop + <span style="color: #ff0000;">", "</span> + ;<br />                  cLeft + <span style="color: #ff0000;">' SAY "'</span> + ::<span style="color: #000000;">cCaption</span> + ;<br />                  <span style="color: #ff0000;">'" SIZE '</span> + cWidth + <span style="color: #ff0000;">", "</span> + ;<br />                  cHeight + <span style="color: #ff0000;">" PIXEL OF oWnd"</span> + CRLF<br /><br /><span style="color: #00C800;">return</span> cCode<br /><br /> </div>[/code:1d5jloq4] Añado correcion en el metodo settext del say que ya fué propuesta hace tiempo en : <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=17900&p=93532&hilit=bget#p93532">viewtopic.php?f=3&t=17900&p=93532&hilit=bget#p93532</a><!-- l --> Si realizamos un setText en el say y lo movemos en modo diseño , vuelve a mostrar el valor original , con este cambio no ocurre . ----------------- edito --------------------------------------- Atención el cambio no vale ya que produce que no refresque el say correctamente . queda pendiente solucionar este problema .
posible mejora al methodo cgenprg() en Twindow
añado mejora metodo cgenprg de checkbox [code=fw:3vf4jprs]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">METHOD</span> cGenPRG<span style="color: #000000;">&#40;</span>lDlgUnits,nindex <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TCheckBox<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cPrg := <span style="color: #ff0000;">""</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nFactorX, nFactorY<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cTop, cLeft, cWidth, cHeight<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> lDlgUnits := .F.<br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> nindex:=<span style="color: #000000;">1</span><br /><br />&nbsp; &nbsp;nFactorX = <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lDlgUnits, <span style="color: #000000;">4</span> / nLoWord<span style="color: #000000;">&#40;</span> GetDlgBaseUnits<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nFactorY = <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lDlgUnits, <span style="color: #000000;">8</span> / nHiWord<span style="color: #000000;">&#40;</span> GetDlgBaseUnits<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">CoorsUpdate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">cCaption</span> == <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">cCaption</span> = GetWindowText<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;cTop &nbsp; &nbsp;= LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> Int<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nTop</span> &nbsp; &nbsp;* nFactorX <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cLeft &nbsp; = LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> Int<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nLeft</span> &nbsp; * nFactorY <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cWidth &nbsp;= LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> Int<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nWidth</span> &nbsp;* nFactorY <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cHeight = LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> Int<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nHeight</span> * nFactorX <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; &nbsp;cPrg += CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">" &nbsp; @ "</span> +cTop &nbsp;+ <span style="color: #ff0000;">", "</span> + cLeft + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">' CHECKBOX aObj['</span>+AllTrim<span style="color: #000000;">&#40;</span>str<span style="color: #000000;">&#40;</span>nIndex<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> +<span style="color: #ff0000;">"] VAR aVar["</span>+AllTrim<span style="color: #000000;">&#40;</span>str<span style="color: #000000;">&#40;</span>nIndex<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">"]"</span>+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">' PROMPT "'</span> + ::<span style="color: #000000;">cCaption</span> + <span style="color: #ff0000;">'" SIZE '</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cWidth + <span style="color: #ff0000;">", "</span> + cHeight + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">" PIXEL OF oWnd "</span> + CRLF<br /><br /><span style="color: #00C800;">return</span> cPrg<br /><br />&nbsp;</div>[/code:3vf4jprs]
posible mejora al methodo cgenprg() en Twindow
añadido mejora en combobox : [code=fw:3ifyk1bw]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">METHOD</span> cGenPrg<span style="color: #000000;">&#40;</span> lDlgUnits,nindex <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TComboBox<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cCode := <span style="color: #ff0000;">""</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> n<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nFactorX, nFactorY<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cTop, cLeft, cWidth, cHeight<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> lDlgUnits := .F.<br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> nindex:=<span style="color: #000000;">1</span><br /><br />&nbsp; &nbsp;nFactorX = <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lDlgUnits, <span style="color: #000000;">4</span> / nLoWord<span style="color: #000000;">&#40;</span> GetDlgBaseUnits<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nFactorY = <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> lDlgUnits, <span style="color: #000000;">8</span> / nHiWord<span style="color: #000000;">&#40;</span> GetDlgBaseUnits<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">CoorsUpdate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;cTop &nbsp; &nbsp;= LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> Int<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nTop</span> &nbsp; &nbsp;* nFactorX <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cLeft &nbsp; = LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> Int<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nLeft</span> &nbsp; * nFactorY <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cWidth &nbsp;= LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> Int<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nRight</span> - ::<span style="color: #000000;">nLeft</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">+1</span> <span style="color: #000000;">&#41;</span> * nFactorY <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cHeight = LTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> Int<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nBottom</span> - ::<span style="color: #000000;">nTop</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">+1</span> <span style="color: #000000;">&#41;</span> &nbsp;* nFactorX <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;cCode += CRLF + <span style="color: #ff0000;">" &nbsp; @ "</span> + cTop + <span style="color: #ff0000;">", "</span> + cLeft &nbsp;+ ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">' COMBOBOX &nbsp;aObj['</span>+AllTrim<span style="color: #000000;">&#40;</span>str<span style="color: #000000;">&#40;</span>nIndex<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> +<span style="color: #ff0000;">"] VAR aVar["</span>+AllTrim<span style="color: #000000;">&#40;</span>str<span style="color: #000000;">&#40;</span>nIndex<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> +<span style="color: #ff0000;">"]"</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">" ITEMS { "</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">for</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aItems</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> n > <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cCode += <span style="color: #ff0000;">", "</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; cCode += <span style="color: #ff0000;">'"'</span> + ::<span style="color: #000000;">aItems</span><span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> + <span style="color: #ff0000;">'"'</span><br />&nbsp; &nbsp;<span style="color: #00C800;">next</span><br /><br />&nbsp; &nbsp;cCode += <span style="color: #ff0000;">" } ;"</span> + CRLF + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">" &nbsp; &nbsp; &nbsp;SIZE "</span> + cWidth + <span style="color: #ff0000;">", "</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cHeight + <span style="color: #ff0000;">" PIXEL OF oWnd"</span> + CRLF<br /><br /><span style="color: #00C800;">return</span> cCode<br />&nbsp;</div>[/code:3ifyk1bw]
posible mejora al methodo cgenprg() en Twindow
Manuel, Perdonad todos que me intrometa, pero quizás mi experiencia sirva de algo. No creo que deban ir por ahí los "tiros". El METHOD cGenPrg() tal como está no creo que nos sirva, es más no creo que se llegue a usar dado que requerimos de otros pasos previos a la obtención del código (como es la propia creación de la ventana/diálogo/control) que nos permiten susbsituirlo completamente; me explico. Yo empezaría desde el principio y seguiría estos pasos: A) Tengo una pared blanca. B) Creo una ventana en ella C) Creo 'n' controles en la ventana D) Obtengo el código, que usaré en el PRG de la compilación de mi aplicación de "gestión de almacenes" (por decir algo). Hasta ahí es muy posible que estemos de acuerdo, otra cosa será cómo hacerlo. Cómo lo haría yo? Yo, en el punto B) usaría un interfaz para indicar como debe ser esta ventana: su tamaño, su título, si es ventana o diálogo, su color, etc. y que dándole al 'Aceptar' del interfaz se dibuje en la pared blanca; si no ya me direis como le digo el título de la ventana. Una vez dibujada se puede habilitar que con doble clic sobre la ventana dibujada se vuelva a llanmar al interfaz para escribir el título si lo queremos cambiar, o escoger un nuevo color, o lo que sea, o incluso escribir el código de su cláusula ON INIT. Lo mismo haría o muy parecido en el punto C) para el caso de los controles, y naturalmente contemplaría el uso de ratón para dimensionar, posicionar, alinear, duplicar, escoger tipos de letra, BMP, colores, etc. Y aquí voy: entonces, si he llamado a un interfaz para escribir contenido de lo que sea, éste mismo interfaz en su botón 'Aceptar' también podría guardar ese contenido en HASES, ARRAY, variables públicas, o donde sea. Si he guardado la información, en este momento soy el dueño de lo que estoy haciendo; estoy desvinculado del comportamiento de Fivewin, y Fivewin está desvinculado del comportamiento del editor de ventanas; no puedo permitir que algun día uno pueda penalizar el desarrollo/evolución del otro. Sigo: posteriormente en el punto D) examinaría esos HASES, ARRAY, variables públicas, o lo que sea, y en base a sus valores (y otros como el orden de creación) crearía código Fivewin. Además en este punto D) puedo decirle que guarde las definiciones de las variables locales en un fichero.... digamos .LCL, así como la definición completa de la ventana y sus controles en otro fichero... digamos SCR. Porque? Para que? Sencillo, en el PRG mi aplicación de "gestión de almacenes" tendré "#include" como el de este ejemplo: Ejemplo: *------------------------------- FUNCTION uAltacliente() #include ventanaaltacliente.lcl ../.. código Fivewin de lo que sea, o inicializando variables, etc. #include ventanaaltacliente.scr ACTIVATE DIALOG oVentanitaCliente CENTER ../.. código Fivewin de lo que sea, o enviando avisos al operador, etc. Return Nil *------------------------------- Por tanto estaría prescindiendo del METHOD cGenPRG(), y sin necesidad de alterar las clases propias de Fivewin. A partir de aquí la imaginación, la información la genero y la manipulo yo, por ejemplo el nombre de las variables lo decido yo. Si tengo que examinar código, un array no me dirá tanta información como el nombre propio de la variable ( 'aControles[25] vs cnombreCliente' por ejemplo ). Otro asunto sería como: - releer código PRG y crear una ventana y sus controles. - usar controles de terceros no estándar de Fivewin. - personalizar controles para que se creen directamente con una valores por defecto. - tener un editor de PRG que al hacer doble clic sobre "#include ventanaaltacliente.scr" abra directamente el diseño de la ventana. - establecer el orden de creación de los controles para que en ejecución el orden del foco sea el deseado. - provocar que los controles de un GROUP (por ejemplo) se "vean" cuando hemos modificado el GROUP (que no queden 'debajo' del GROUP). En fin, que no veo claro que cGenPRG() sea el camino. Y te he soltado este rollo, porque ya has demostrado de lo que eres capaz y tu puedes crear una herramienta que haga todo eso y más. Si consigo contenerme ya no daré más la lata. Gracias.
posible mejora al methodo cgenprg() en Twindow
Efectivamente tu plantamiento es correcto cara a realizar un ide , diseñador o generador de código , cara a poder recuperar el código escrito y mucho mas. En este caso , la única intención de los cambios que propongo en este post es completar correcciones pendientes del código fivewin que ya existe , siguiendo la misma filosofía ( e incluso haciendo un copia-pega ) de los últimos cambios realizados en él ( Tbotton:cgenprg() ) con la intención que el ejemplo propuesto rdesign.prg corra sin problemas y que funcione el añadido que puse en un post de poder ejecutar "en linea" el código generado. Todo esto me sirve para ponerme al día de las cosas nuevas de fivewin a la vez que hecho un cable con el código que ha quedado desactualizado. Gracias a ello también me he dado cuenta que las medidas que ponemos en código en un dialogo no corresponden con las medidas que luego tiene el dialogo ejecutandose ( un bug que solucionar) y alguna cosilla mas ira apareciendo . Es bueno que quede toda tu exposición aquí cara a poder realizar un generador completo e independiente o mejorar y actualizar tu herramienta de generación de código , pero no es la intención de estos cambios. Gracias por tu interés y saludos a Todos.
posible mejora en Tprinter
Sería bueno añadir este par de metodos a la clase tPrinter , quitaría algo de trabajo . [code=fw:3nt8mm0s]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">METHOD</span> CmBox<span style="color: #000000;">&#40;</span> nRow, nCol, nBottom, nRight, oPen <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TPrinter<br /><span style="color: #00C800;">local</span> aTmp := ::<span style="color: #000000;">CmRect2Pix</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#123;</span> nRow, nCol, nBottom, nRight <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">Box</span><span style="color: #000000;">&#40;</span> aTmp<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>, atmp<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>, aTmp<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>, aTmp<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>, oPen <span style="color: #000000;">&#41;</span> <br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">METHOD</span> CmLine<span style="color: #000000;">&#40;</span> nRow, nCol, nBottom, nRight, oPen <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TPrinter<br /><span style="color: #00C800;">local</span> aTmp := ::<span style="color: #000000;">CmRect2Pix</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#123;</span> nRow, nCol, nBottom, nRight <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">Line</span><span style="color: #000000;">&#40;</span> aTmp<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>, atmp<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>, aTmp<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>, aTmp<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>, oPen <span style="color: #000000;">&#41;</span> <br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /> </div>[/code:3nt8mm0s]
posible mejora en Tprinter
Manuel, gracias! Incluido para el próximo build <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> He modificado tu código asi: [code=fw:2q78h99z]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">METHOD</span> CmBox<span style="color: #000000;">&#40;</span> nRow, nCol, nHeight, nWidth, oPen <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TPrinter<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aTmp := ::<span style="color: #000000;">CmRect2Pix</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> nRow, nCol, nRow + nHeight - <span style="color: #000000;">1</span>, nCol + nWidth - <span style="color: #000000;">1</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> ::<span style="color: #000000;">Box</span><span style="color: #000000;">&#40;</span> aTmp<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, aTmp<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>, aTmp<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span>, aTmp<span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span>, oPen <span style="color: #000000;">&#41;</span><br />&nbsp;<br /><span style="color: #00C800;">METHOD</span> CmLine<span style="color: #000000;">&#40;</span> nRow, nCol, nHeight, nWidth, oPen <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TPrinter<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aTmp := ::<span style="color: #000000;">CmRect2Pix</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> nRow, nCol, nRow + nHeight - <span style="color: #000000;">1</span>, nCol + nWidth - <span style="color: #000000;">1</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> ::<span style="color: #000000;">Line</span><span style="color: #000000;">&#40;</span> aTmp<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, aTmp<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>, aTmp<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span>, aTmp<span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span>, oPen <span style="color: #000000;">&#41;</span> <br />&nbsp;</div>[/code:2q78h99z]
posible mejora en Tprinter
Esa implementación me parece muy correcta , pero rompe un poco con el paralelismo con ::box() y ::line() que no usan alto y ancho sino cordenadas "finales" . Para mi es mas cómoda tu implementacion , pero ... ¿ Como lo ves ?
posible mejora en Tprinter
Manuel, Tienes razón, es preferible implementarlo de la misma forma usada anteriormemte <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> gracias!
posible mejora en Tprinter
mas mejora : [code=fw:i2v8xmhl]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">METHOD</span> Pix2Cmtr<span style="color: #000000;">&#40;</span>nRow, nCol<span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#40;</span> nRow := <span style="color: #000000;">&#40;</span> nRow * <span style="color: #000000;">25.4</span> / ::<span style="color: #000000;">nLogPixelX</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">10</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nCol := <span style="color: #000000;">&#40;</span> nCol * <span style="color: #000000;">25.4</span> / ::<span style="color: #000000;">nLogPixelY</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> /<span style="color: #000000;">10</span> &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span>nRow, nCol<span style="color: #000000;">&#125;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#41;</span><br /><br />&nbsp;</div>[/code:i2v8xmhl]
posible mejora en Tprinter
Incluido tambien, gracias! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
posible mejora en Tprinter
Aun mas . Estas devuelven el punto que centra el texto en la página . La longuitud del texto en cm. imprime un texto con un box . imprime un texto con un box centrado en la pagina ( ideal para titulos) Ya esta completo . [code=fw:3qpgpqsz]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><br /><span style="color: #00C800;">METHOD</span> CmtrGetTextWidth<span style="color: #000000;">&#40;</span> cText, oFont <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">GetTextWidth</span><span style="color: #000000;">&#40;</span> cText, oFont <span style="color: #000000;">&#41;</span> * <span style="color: #000000;">25.4</span> / ::<span style="color: #000000;">nLogPixelX</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">10</span><br /><br /><span style="color: #00C800;">METHOD</span> CmtrTextToCenter<span style="color: #000000;">&#40;</span> cText, oFont <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span>  ;<br />       <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nHorzSiZe</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">10</span>   <span style="color: #000000;">&#41;</span> /<span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> -  <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">GetTextWidth</span><span style="color: #000000;">&#40;</span> cText, oFont <span style="color: #000000;">&#41;</span> * <span style="color: #000000;">25.4</span> / ::<span style="color: #000000;">nLogPixelX</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span> /<span style="color: #000000;">2</span><br /><br /><span style="color: #00C800;">METHOD</span> TextInBoxCentered<span style="color: #000000;">&#40;</span>nTop,cText,cmExRow,cmExCol,ofont,oPen,nColor <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span>  ;<br />    ::<span style="color: #000000;">TextInBox</span><span style="color: #000000;">&#40;</span> nTop, ::<span style="color: #000000;">CmtrTextToCenter</span><span style="color: #000000;">&#40;</span> cText, oFont <span style="color: #000000;">&#41;</span>,cText,cmExRow,cmExCol,ofont,oPen,nColor <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">METHOD</span> TextInBox<span style="color: #000000;">&#40;</span>nTop,nLeft,cText,cmExRow,cmExCol,oFont,oPen,nColor <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TPrinter<br /><br /><span style="color: #00C800;">local</span> cmTextWidth   := <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">GetTextWidth</span><span style="color: #000000;">&#40;</span> cText, oFont <span style="color: #000000;">&#41;</span> * <span style="color: #000000;">25.4</span> / ::<span style="color: #000000;">nLogPixelX</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">10</span><br /><span style="color: #00C800;">local</span> cmTextHeight  := <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">GetTextHeight</span><span style="color: #000000;">&#40;</span> cText, oFont <span style="color: #000000;">&#41;</span> * <span style="color: #000000;">25.4</span> / ::<span style="color: #000000;">nLogPixelY</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">10</span><br /><br />       ::<span style="color: #000000;">cmBox</span><span style="color: #000000;">&#40;</span> nTop - cmExRow  , ;<br />                 nLeft - cmExCol ,;<br />                 nTop + cmTextWidth  + cmExRow , ;<br />                 nLeft+ cmTextHeight + cmExCol , ;<br />                 oPen <span style="color: #000000;">&#41;</span><br /><br />      ::<span style="color: #000000;">cmsay</span><span style="color: #000000;">&#40;</span> nTop,nLeft,cText,oFont,,nColor <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">nil</span><br /><br /><br /> </div>[/code:3qpgpqsz]
posible mejora en Tprinter
Estimado.... que bueno estas nuevas mejoras.... podrías publica como te queda la clase arregada ? gracias totales david
posible mejora en Tprinter
En síntesis , si todo esto va de la mano con un TestPrn.Prg, es mas significativo. saludos.
posible mejora en Tprinter
[quote="davidObarrio":geegeh3k]Estimado.... que bueno estas nuevas mejoras.... podrías publica como te queda la clase arregada ? gracias totales david[/quote:geegeh3k] Siento no poder enviar la clase tprinter pertenece a Fivetech y esta bajo licencia , por ello he publicar los trozos de código variados pero no la clase completa. [quote="sysctrl2":geegeh3k]En síntesis , si todo esto va de la mano con un TestPrn.Prg, es mas significativo. saludos.[/quote:geegeh3k] Intentaré hacer un ejemplo sencillo entre hoy y mañana , aunque ahora mismo estoy algo liado , si mañana no publico el sample la cosa tendra que esperar a que vuelva pues salgo el sabado de viaje para toda la semana . Para la vuelta prometido que tienes algo . Saludos.
posible mejora en Tprinter
Aqui dejo un testprint7.prg rapido .No lo he testeado pues no estoy en windows pero tiene que funcionar si añadimos los metodos anteriores. [code=fw:1a2ruocq]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br />&nbsp;<span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> oPrn, cText <br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> &nbsp;oFont<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> cmLeft<br />&nbsp; &nbsp; <span style="color: #00C800;">local</span> cmTexto<br />&nbsp; <br />&nbsp; <br />&nbsp; &nbsp;<span style="color: #0000ff;">PRINTER</span> oPrn PREVIEW<br /><br />&nbsp; &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;">"Courier New"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">-10</span> <span style="color: #0000ff;">OF</span> oPrn<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">DEFINE</span> PEN &nbsp;oPen1 &nbsp;<span style="color: #0000ff;">STYLE</span> PS_SOLID WIDTH <span style="color: #000000;">2</span> <span style="color: #0000ff;">OF</span> oPrn<br />&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PAGE</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; oPrn:<span style="color: #000000;">TextInBox</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span>,<span style="color: #000000;">5</span>,<span style="color: #ff0000;">"Texto dentro de box"</span>,<span style="color: #000000;">0.2</span>,<span style="color: #000000;">0.2</span>,oFont,oPen1 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oPrn:<span style="color: #000000;">TextInBoxCentered</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">8</span>,<span style="color: #ff0000;">"Texto Centrado en pagina dentro de box"</span>,<span style="color: #000000;">0.2</span>,<span style="color: #000000;">0.2</span>,ofont,oPen1 <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cmLeft:= oPrn:<span style="color: #000000;">CmtrTextToCenter</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Texto que debemos centrar"</span>, oFont <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oPrn:<span style="color: #000000;">cmSay</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">12</span>,cmLeft,<span style="color: #ff0000;">"Texto que debemos centrar"</span>,oFont <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; cmText:= oPrn:<span style="color: #000000;">CmtrGetTextWidth</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Texto del que queremos saber su longuitud en centimetros"</span>, oFont <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; oPrn:<span style="color: #000000;">cmSay</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">14</span>,<span style="color: #000000;">5</span>,<span style="color: #ff0000;">"El texto anterior mide "</span>+AllTrim<span style="color: #000000;">&#40;</span>Str<span style="color: #000000;">&#40;</span>cmtext<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>+ <span style="color: #ff0000;">" cm."</span>,oFont <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ENDPAGE</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #0000ff;">ENDPRINTER</span><br />&nbsp; &nbsp;<br />&nbsp; <br />&nbsp; &nbsp;oFont:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <br /><br /> </div>[/code:1a2ruocq]
posible mejora en Tprinter
Manuel, Añadido para FWH 13.05, gracias! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
posible mejora en Tprinter
Antonio , En el código existe un gazapo en el metodo TextInBox ( cambiado alto * ancho ) La forma correcta es esta : [code=fw:3o85107n]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">METHOD</span> TextInBox<span style="color: #000000;">&#40;</span>nTop,nLeft,cText,cmExRow,cmExCol,oFont,oPen,nColor <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TPrinter<br /><br /><span style="color: #00C800;">local</span> cmTextWidth   := <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">GetTextWidth</span><span style="color: #000000;">&#40;</span> cText, oFont <span style="color: #000000;">&#41;</span> * <span style="color: #000000;">25.4</span> / ::<span style="color: #000000;">nLogPixelX</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">10</span><br /><span style="color: #00C800;">local</span> cmTextHeight  := <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">GetTextHeight</span><span style="color: #000000;">&#40;</span> cText, oFont <span style="color: #000000;">&#41;</span> * <span style="color: #000000;">25.4</span> / ::<span style="color: #000000;">nLogPixelY</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">10</span><br /><br />       ::<span style="color: #000000;">cmBox</span><span style="color: #000000;">&#40;</span> nTop - cmExRow  , ;<br />                 nLeft - cmExCol ,;<br />                 nTop + cmTextHeight  + cmExRow , ;<br />                 nLeft+cmTextWidth  + cmExCol , ;<br />                 oPen <span style="color: #000000;">&#41;</span><br /><br />      ::<span style="color: #000000;">cmsay</span><span style="color: #000000;">&#40;</span> nTop,nLeft,cText,oFont,,nColor <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">nil</span><br /><br /><br /> </div>[/code:3o85107n] el testprint7 revisado : [code=fw:3o85107n]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /> <span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">local</span> oPrn, cText <br />    <span style="color: #00C800;">local</span>  oFont<br />    <span style="color: #00C800;">local</span> cmLeft<br />    <span style="color: #00C800;">local</span> cmTexto<br />  <br />  <br />   <span style="color: #0000ff;">PRINTER</span> oPrn PREVIEW<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;">"Courier New"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">-10</span> <span style="color: #0000ff;">OF</span> oPrn<br />      <span style="color: #0000ff;">DEFINE</span> PEN  oPen1  <span style="color: #0000ff;">STYLE</span> PS_SOLID WIDTH <span style="color: #000000;">2</span> <span style="color: #0000ff;">OF</span> oPrn<br />     <br />      <span style="color: #0000ff;">PAGE</span><br /><br />        oPrn:<span style="color: #000000;">TextInBox</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span>,<span style="color: #000000;">5</span>,<span style="color: #ff0000;">"Texto dentro de box"</span>,<span style="color: #000000;">0.2</span>,<span style="color: #000000;">0.2</span>,oFont,oPen1 <span style="color: #000000;">&#41;</span><br />        oPrn:<span style="color: #000000;">TextInBoxCentered</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">8</span>,<span style="color: #ff0000;">"Texto Centrado en pagina dentro de box"</span>,<span style="color: #000000;">0.2</span>,<span style="color: #000000;">0.2</span>,ofont,oPen1 <span style="color: #000000;">&#41;</span><br /><br />         cmLeft:= oPrn:<span style="color: #000000;">CmtrTextToCenter</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Texto que debemos centrar"</span>, oFont <span style="color: #000000;">&#41;</span><br />        oPrn:<span style="color: #000000;">cmSay</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">12</span>,cmLeft,<span style="color: #ff0000;">"Texto que debemos centrar"</span>,oFont <span style="color: #000000;">&#41;</span><br /><br />        cmText:= oPrn:<span style="color: #000000;">CmtrGetTextWidth</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Texto del que queremos saber su longuitud en centimetros"</span>, oFont <span style="color: #000000;">&#41;</span><br /><br />        oPrn:<span style="color: #000000;">cmSay</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">14</span>,<span style="color: #000000;">5</span>,<span style="color: #ff0000;">"El texto anterior mide "</span>+AllTrim<span style="color: #000000;">&#40;</span>Str<span style="color: #000000;">&#40;</span>cmtext<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>+ <span style="color: #ff0000;">" cm."</span>,oFont <span style="color: #000000;">&#41;</span><br />                       <br />      <span style="color: #0000ff;">ENDPAGE</span>          <br />      <br />   <span style="color: #0000ff;">ENDPRINTER</span><br />   <br />  <br />   oFont:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <br /><br /><br /> </div>[/code:3o85107n] el resultado del test : [img:3o85107n]http&#58;//img189&#46;imageshack&#46;us/img189/431/20130530222517&#46;png[/img:3o85107n]
posible mejora en Tprinter
Buen trabajo, gracias por tu tiempo y esfuerzo en mejorar las clases, y por compartir ese trabajo.
posible mejora en xbrowse .
para los que tengan funcionando el Estilo 2010 en el menu principal queda feo el estilo 2007 en los pop menus del xbrowse . A mi me funciona bien asi. [code=fw:3nubxrvn]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">METHOD</span> SetColumns<span style="color: #000000;">&#40;</span> nRow, nCol, nFlags <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> MyBrowse<br />&nbsp; &nbsp; ...<br />&nbsp; &nbsp;<span style="color: #0000ff;">MENU</span> oMenu <span style="color: #0000ff;">POPUP</span><br /><br />&nbsp; &nbsp; &nbsp; oMenu:<span style="color: #000000;">l2010</span> &nbsp;:= WndMain<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">oMenu</span>:<span style="color: #000000;">l2010</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> !oMenu:<span style="color: #000000;">l2010</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oMenu:<span style="color: #000000;">l2007</span> &nbsp;:= ::<span style="color: #000000;">l2007</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">for</span> nFor := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> nLen<br /><br />&nbsp; &nbsp; &nbsp; ...<br />&nbsp;<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><br />&nbsp;</div>[/code:3nubxrvn]
posible mejora en xbrowse .
Thanks for pointing out. Implemented in 13.07 release. [code=fw:3t04t8u5]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; <span style="color: #0000ff;">MENU</span> oMenu <span style="color: #0000ff;">POPUP</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">l2007</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> WndMain<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> != <span style="color: #00C800;">nil</span> .and. WndMain<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">oMenu</span> != <span style="color: #00C800;">nil</span> .and. WndMain<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">oMenu</span>:<span style="color: #000000;">l2010</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oMenu:<span style="color: #000000;">l2010</span> &nbsp; &nbsp;:= .t.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oMenu:<span style="color: #000000;">l2007</span> &nbsp; &nbsp;:= .t.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp;</div>[/code:3t04t8u5]
posible pequeño cambio en xbrowse
En PaintCell de TXBrwColumn ... en caso de que el boton tenga bmp se ajusta a bmp , pero si definimos un ancho mayor del boton se coge ese ancho ... [code=fw:3vzinnwt]<div class="fw" id="{CB}" style="font-family: monospace;"><br />....<br />&nbsp; <span style="color: #00C800;">if</span> nType > <span style="color: #000000;">1</span><br />&nbsp;<span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> aBitmap := ::<span style="color: #000000;">aBitmap</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nBtnBmp</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nBtnWidth &nbsp; &nbsp; &nbsp;:= aBitMap<span style="color: #000000;">&#91;</span> BITMAP_WIDTH <span style="color: #000000;">&#93;</span> + <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aBitmap &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> nBtnWidth &nbsp;< IfNil<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nBtnWidth</span>, <span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// añadido</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nBtnWidth := IfNil<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nBtnWidth</span>, <span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// añadido</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// &nbsp;añadido</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nBtnWidth &nbsp; &nbsp; &nbsp;:= IfNil<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nBtnWidth</span>, <span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />...<br />&nbsp;</div>[/code:3vzinnwt]
posicionar un buttonbar
Hola amigos, ¿alguien sabría decirme como puedo decirle a buttonbar que aparezca en una determinada posición de la ventana? [code=fw:3710bzeb]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">20</span> <span style="color: #000000;">2007</span></div>[/code:3710bzeb] Por defecto me aparece pegado al margen superior, pero digamos que quiero que aparezca unos espacios mas abajo. <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? -->
posicionar un buttonbar
Ups!! Pido disculpas. Ya lo he solucionado. [code=fw:2vgourrv]<div class="fw" id="{CB}" style="font-family: monospace;">@ x,y <span style="color: #0000ff;">BUTTONBAR</span> oBar <span style="color: #0000ff;">OF</span> oWnd</div>[/code:2vgourrv] Es que ando algo oxidado <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
posición inicial en un get vacio con picture
Estimado Antonio, he notado que en los get cuando esta vacio (no tiene texto), y lo seleccionamos con el raton dando click en cualquier parte del get, se posiciona en la primera posición, (lo cual es lo correcto), pero si el get tiene un picture por ejemplo "@R 9999-9999" la posición se mantiene donde demos el click con el raton. aun cuando no hay dato, solo por estar el template. por loque si el usuario inicia a introducir datos queda feisimo.<!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> salu2
posición inicial en un get vacio con picture
Estimado Carlos, Supongo que estás editando un valor numérico. Estas líneas en tget.prg controlan ese comportamiento: [code=fw:sgwsdec2]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Type</span> != <span style="color: #ff0000;">"N"</span> .and. ::<span style="color: #000000;">nPos</span> == <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Home</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">SetPos</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Pos</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">type</span> == <span style="color: #ff0000;">"N"</span> .and. ::<span style="color: #000000;">lRightToLeft</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">SetPos</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nNumLen</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<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;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Pos</span> = ::<span style="color: #000000;">nPos</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span></div>[/code:sgwsdec2] al ser numérico pasa por el else y ahí no se hace el ::oGet:Home(). Prueba a hacer ::oGet:Home() en ambos casos
posición inicial en un get vacio con picture
Gracias Antonio, reviso, realmente es un get de texto (numero de mobil) con un picture "R 9999-9999" por lo que solo acepta numeros, NO es numerico. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> revisare....
posición inicial en un get vacio con picture
Gracias antonio, por la sugerencia, asi quedo: [code=fw:14gaf46o]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Type</span> != <span style="color: #ff0000;">"N"</span> .and. ::<span style="color: #000000;">nPos</span> == <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Home</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">SetPos</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Pos</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> ::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">type</span> == <span style="color: #ff0000;">"N"</span> .and. ::<span style="color: #000000;">lRightToLeft</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">SetPos</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nNumLen</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<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;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Type</span> == <span style="color: #ff0000;">"C"</span> .and. Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">Value</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Home</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">SetPos</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Pos</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Pos</span> = ::<span style="color: #000000;">nPos</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp;</div>[/code:14gaf46o]
position a child in a Mdi window
I have a window Main initial as this : [img:j62gegtc]https&#58;//i&#46;postimg&#46;cc/2yB3fjnk/1w&#46;png[/img:j62gegtc] It is not made with fwh outllook, there ia a vertical splitter at the end and the I wish insert a child window but the window must not go down the outlook menu [img:j62gegtc]https&#58;//i&#46;postimg&#46;cc/cLJCscRk/2w&#46;png[/img:j62gegtc] but it must be allway on the part gray of window the child window must not go beyond the splitter if I move the splitter on the left, it must shrink the customer window how I must make ?
position a child in a Mdi window
Silvio, You need to use panels instead of MDI windows. Sorry, I don't have an example I can show you. James
position of a dialog near to a get
How show a dialog near the get ( get ...bitmap) near to button of the get ?
position of a dialog near to a get
Silvio, try to get the coords with getWndRect( oGet:hWnd ) and you can apply the get's width and height too if you need other coords I think what you want to do is a datepicker, but I have problem to close the dialog (cal) when click outside it [code=fw:3c84rcvv]<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;">"calendar.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> oDlg<br /><span style="color: #00C800;">LOCAL</span> fecha := DATE<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;SET DATE <span style="color: #0000ff;">TO</span> BRITISH<br />&nbsp; &nbsp;SET EPOCH <span style="color: #0000ff;">TO</span> <span style="color: #000000;">1980</span> &nbsp; &nbsp; &nbsp; <br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">10</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">200</span>,<span style="color: #000000;">300</span> <span style="color: #0000ff;">PIXEL</span><br /><br />@ <span style="color: #000000;">20</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">GET</span> fecha <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">22</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ACTION</span> cal<span style="color: #000000;">&#40;</span> fecha, <span style="color: #00C800;">self</span> <span style="color: #000000;">&#41;</span> BITMAP &nbsp;<span style="color: #ff0000;">"close.bmp"</span> <br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> cal<span style="color: #000000;">&#40;</span> fecha, oGet <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oWnd, oCal, aRect<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> dHoy := fecha, lOk := .T.<br /><br />&nbsp; &nbsp;aRect := getWndRect<span style="color: #000000;">&#40;</span> oGet:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oWnd <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">174</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">STYLE</span> WS_CHILD | WS_POPUP | WS_VISIBLE <br />&nbsp; <br />&nbsp; &nbsp;@ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> CALENDAR oCal <span style="color: #0000ff;">VAR</span> dHoy <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">PIXEL</span> DAYSTATE <span style="color: #0000ff;">size</span> <span style="color: #000000;">87</span>,<span style="color: #000000;">75</span> DBLCLICK oWnd:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oWnd:<span style="color: #000000;">bLostFocus</span> := <span style="color: #000000;">&#123;</span>|| oWnd:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;oCal:<span style="color: #000000;">bLostFocus</span> := <span style="color: #000000;">&#123;</span>|| oWnd:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;oCal:<span style="color: #000000;">bKeyDown</span> &nbsp; := <span style="color: #000000;">&#123;</span>|nkey| <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> nKey = <span style="color: #000000;">13</span> .OR. nKey = <span style="color: #000000;">32</span>, oWnd:<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;">&#125;</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oWnd <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oWnd:<span style="color: #0000ff;">move</span><span style="color: #000000;">&#40;</span>aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> + oGet:<span style="color: #000000;">nHeight</span> ,aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> lOk &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; oGet:<span style="color: #000000;">cText</span> := dHoy<br />&nbsp; &nbsp; &nbsp; oGet:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp;<br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp;</div>[/code:3c84rcvv]
position of a dialog near to a get
A possible solution is change the dialog by window, but now don't work ESC to close the calendar [code=fw:7fe67apk]<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;">"calendar.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> oDlg<br /><span style="color: #00C800;">LOCAL</span> fecha := DATE<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;SET DATE <span style="color: #0000ff;">TO</span> BRITISH<br />&nbsp; &nbsp;SET EPOCH <span style="color: #0000ff;">TO</span> <span style="color: #000000;">1980</span> &nbsp; &nbsp; &nbsp; <br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">10</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">200</span>,<span style="color: #000000;">300</span> <span style="color: #0000ff;">PIXEL</span><br /><br />@ <span style="color: #000000;">20</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">GET</span> fecha <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">22</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ACTION</span> cal<span style="color: #000000;">&#40;</span> fecha, <span style="color: #00C800;">self</span> <span style="color: #000000;">&#41;</span> BITMAP &nbsp;<span style="color: #ff0000;">"close.bmp"</span> <br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> cal<span style="color: #000000;">&#40;</span> fecha, oGet <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oWnd, oCal, aRect<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> dHoy := fecha, lOk := .T., lLostFocus := .F.<br /><br />&nbsp; &nbsp;aRect := getWndRect<span style="color: #000000;">&#40;</span> oGet:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">174</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">STYLE</span> WS_CHILD | WS_POPUP | WS_VISIBLE <br />&nbsp; <br />&nbsp; &nbsp;@ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> CALENDAR oCal <span style="color: #0000ff;">VAR</span> dHoy <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">PIXEL</span> DAYSTATE <span style="color: #0000ff;">size</span> <span style="color: #000000;">150</span>,<span style="color: #000000;">174</span> DBLCLICK oWnd:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">//87,75</span><br /><br />&nbsp; &nbsp;oCal:<span style="color: #000000;">bLostFocus</span> := <span style="color: #000000;">&#123;</span>|| lLostFocus := .T., oWnd:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;oCal:<span style="color: #000000;">bKeyDown</span> &nbsp; := <span style="color: #000000;">&#123;</span>|nkey| <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> nKey = <span style="color: #000000;">13</span> .OR. nKey = <span style="color: #000000;">32</span>, oWnd:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, &nbsp;<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;oWnd:<span style="color: #000000;">oClient</span> := oCal<br />&nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oWnd:<span style="color: #0000ff;">move</span><span style="color: #000000;">&#40;</span>aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> + oGet:<span style="color: #000000;">nHeight</span> ,aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">VALID</span> <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> lOk .AND. ! lLostFocus .AND. ! GetKeyState<span style="color: #000000;">&#40;</span> VK_ESCAPE <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#40;</span> oGet:<span style="color: #000000;">cText</span> := dHoy, oGet:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, .T. <span style="color: #000000;">&#41;</span>, .T. <span style="color: #000000;">&#41;</span><br />&nbsp;<br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp;</div>[/code:7fe67apk]
position of a dialog near to a get
Ok, this work, but I don't know if it's the best solution [code=fw:2evklcds]<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;">"calendar.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> oDlg<br /><span style="color: #00C800;">LOCAL</span> fecha := DATE<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;SET DATE <span style="color: #0000ff;">TO</span> BRITISH<br />&nbsp; &nbsp;SET EPOCH <span style="color: #0000ff;">TO</span> <span style="color: #000000;">1980</span> &nbsp; &nbsp; &nbsp; <br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">10</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">200</span>,<span style="color: #000000;">300</span> <span style="color: #0000ff;">PIXEL</span><br /><br />@ <span style="color: #000000;">20</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">GET</span> fecha <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">22</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ACTION</span> cal<span style="color: #000000;">&#40;</span> fecha, <span style="color: #00C800;">self</span> <span style="color: #000000;">&#41;</span> BITMAP &nbsp;<span style="color: #ff0000;">"close.bmp"</span> <br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> cal<span style="color: #000000;">&#40;</span> fecha, oGet <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oWnd, oCal, aRect<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> dHoy := fecha, lOk := .T., lLostFocus := .F.<br /><br />&nbsp; &nbsp;aRect := getWndRect<span style="color: #000000;">&#40;</span> oGet:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">174</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">STYLE</span> WS_CHILD | WS_POPUP | WS_VISIBLE <br />&nbsp; <br />&nbsp; &nbsp;@ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> CALENDAR oCal <span style="color: #0000ff;">VAR</span> dHoy <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">PIXEL</span> DAYSTATE <span style="color: #0000ff;">size</span> <span style="color: #000000;">150</span>,<span style="color: #000000;">174</span> DBLCLICK oWnd:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">//87,75</span><br /><br />&nbsp; &nbsp;oCal:<span style="color: #000000;">bLostFocus</span> := <span style="color: #000000;">&#123;</span>|| lLostFocus := .T., oWnd:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;oCal:<span style="color: #000000;">bKeyDown</span> &nbsp; := <span style="color: #000000;">&#123;</span>|nkey| <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> nKey = <span style="color: #000000;">13</span> .OR. nKey = <span style="color: #000000;">32</span>, oWnd:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, &nbsp;<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;oWnd:<span style="color: #000000;">oClient</span> := oCal<br />&nbsp; &nbsp;oWnd:<span style="color: #000000;">bKeyDown</span> := <span style="color: #000000;">&#123;</span>|nkey| <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> GetKeyState<span style="color: #000000;">&#40;</span> VK_ESCAPE <span style="color: #000000;">&#41;</span>, oWnd:<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;">&#125;</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span> oWnd:<span style="color: #0000ff;">move</span><span style="color: #000000;">&#40;</span>aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> + oGet:<span style="color: #000000;">nHeight</span> ,aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>, oCal:<span style="color: #000000;">setFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">VALID</span> <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> lOk .AND. ! lLostFocus .AND. ! GetKeyState<span style="color: #000000;">&#40;</span> VK_ESCAPE <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#40;</span> oGet:<span style="color: #000000;">cText</span> := dHoy, oGet:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, .T. <span style="color: #000000;">&#41;</span>, .T. <span style="color: #000000;">&#41;</span><br />&nbsp;<br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp;</div>[/code:2evklcds]
position of a dialog near to a get
GOOD I'm trying your samples
position of a dialog near to a get
on W7 not run good I see only 5 days and not all lines
position of a dialog near to a get
Hi, it is strange, because I develop it in win7 32 bits regards Marcelo
position of a dialog near to a get
I have ASUS G73JW WITH 860 QM INTEL CORE 7 8 GIGA RAM 1,5 GIGA NVIDIA GEFORCE GTX440M BLUE RAY WRITER EAX 5.0 BUT WITH WINDOWS HOME PREMIUM 64 BIT [img:1kmvwtfb]http&#58;//img535&#46;imageshack&#46;us/img535/5898/da2o&#46;jpg[/img:1kmvwtfb] Now I have this resolution of screen : default 125% I tried also with 150% or 100% with 100% I see all smaller
position of a dialog near to a get
Silvio, sorry I don't have win7 64. This is an improve, now work properly when we are using themes [code=fw:2ct49fhw]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">FUNCTION</span> calendar<span style="color: #000000;">&#40;</span> fecha, oGet <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">//------------------------------------------------------------------------------</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oWnd, oCal, aRect, w, h, x, y, cps<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> dHoy := fecha, lOk := .T., lLostFocus := .F.<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> isAppthemed<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; w := <span style="color: #000000;">224</span>; h := <span style="color: #000000;">159</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; w := <span style="color: #000000;">174</span>; h := <span style="color: #000000;">150</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;aRect := getWndRect<span style="color: #000000;">&#40;</span> oGet:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;y := aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> + oGet:<span style="color: #000000;">nHeight</span><br />&nbsp; &nbsp;x := aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">FROM</span> y, x <span style="color: #0000ff;">TO</span> y + h, x + w <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">STYLE</span> WS_CHILD | WS_POPUP | WS_VISIBLE<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> CALENDAR oCal <span style="color: #0000ff;">VAR</span> dHoy <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">size</span> h,w DBLCLICK oWnd:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//87,75</span><br /><br />&nbsp; &nbsp;oCal:<span style="color: #000000;">bLostFocus</span> := <span style="color: #000000;">&#123;</span>|| lLostFocus := .T., oWnd:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;oCal:<span style="color: #000000;">bKeyDown</span> &nbsp; := <span style="color: #000000;">&#123;</span>|nkey| <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> nKey = <span style="color: #000000;">13</span> .OR. nKey = <span style="color: #000000;">32</span>, oWnd:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, &nbsp;<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;oWnd:<span style="color: #000000;">oClient</span> := oCal<br />&nbsp; &nbsp;oWnd:<span style="color: #000000;">bKeyDown</span> := <span style="color: #000000;">&#123;</span>|nkey| <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> GetKeyState<span style="color: #000000;">&#40;</span> VK_ESCAPE <span style="color: #000000;">&#41;</span>, oWnd:<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;">&#125;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#40;</span> oWnd:<span style="color: #0000ff;">move</span><span style="color: #000000;">&#40;</span>aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> + oGet:<span style="color: #000000;">nHeight</span> ,aRect<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span>, oCal:<span style="color: #000000;">setFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">VALID</span> <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> lOk .AND. ! lLostFocus .AND. ! GetKeyState<span style="color: #000000;">&#40;</span> VK_ESCAPE <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#40;</span> oGet:<span style="color: #000000;">cText</span> := dHoy, oGet:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, .T. <span style="color: #000000;">&#41;</span>, .T. <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp;</div>[/code:2ct49fhw]
position of a dialog near to a get
I understtod I cannot use this feature I must use dtpick only... on win7 64bit
position of an Image
I must change the position on bresize of a dialog this image is on a TTitle control I tried with [b:3vppmejh]oImagetitle:nLeft[/b:3vppmejh]:=oTitle:nWidth-120 but it make error because there is not nleft valriable on ttitle image and I not found a right variable on class How I can resolve it ?
position of an Image
Silvio, oTitle:SetPos( nTop, nLeft )
position of an Image
not run I need to move the image of the otitle
position of an Image
Silvio, Try this: oTitle:aImgs[ 1 ] = nRow oTitle:aImgs[ 2 ] = nCol oTitle:Refresh()
position of an Image
Antonio, made error [code=fw:oxr9j37m]<div class="fw" id="{CB}" style="font-family: monospace;">Application<br />===========<br />&nbsp; &nbsp;Path and <span style="color: #0000ff;">name</span>: <span style="color: #000000;">E</span>:\Modelli_Mail\test.Exe <span style="color: #000000;">&#40;</span><span style="color: #000000;">32</span> bits<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">Size</span>: <span style="color: #000000;">2</span>,<span style="color: #000000;">716</span>,<span style="color: #000000;">160</span> bytes<br />&nbsp; &nbsp;Compiler version: <span style="color: #000000;">xHarbour</span> <span style="color: #000000;">1.2</span><span style="color: #000000;">.3</span> Intl. <span style="color: #000000;">&#40;</span>SimpLex<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#40;</span>Build <span style="color: #000000;">20140725</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;FiveWin &nbsp;Version: <span style="color: #000000;">FWHX</span> <span style="color: #000000;">15.01</span><br />&nbsp; &nbsp;Windows version: <span style="color: #000000;">5.1</span>, Build <span style="color: #000000;">2600</span> Service Pack <span style="color: #000000;">3</span><br /><br />&nbsp; &nbsp;Time <span style="color: #0000ff;">from</span> start: <span style="color: #000000;">0</span> hours <span style="color: #000000;">0</span> mins <span style="color: #000000;">0</span> secs <br />&nbsp; &nbsp;Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">05</span>/<span style="color: #000000;">28</span>/<span style="color: #000000;">15</span>, <span style="color: #000000;">08</span>:<span style="color: #000000;">45</span>:<span style="color: #000000;">20</span><br />&nbsp; &nbsp;Error description: <span style="color: #000000;">Error</span> BASE/<span style="color: #000000;">1068</span> &nbsp;Argument error: <span style="color: #000000;">array</span> access<br />&nbsp; &nbsp;Args:<br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> &nbsp; <span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> = N &nbsp; <span style="color: #000000;">527</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> &nbsp; <span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> = N &nbsp; <span style="color: #000000;">3</span><br /><br />Stack Calls<br />===========<br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\TTITLE.PRG => TTITLE:<span style="color: #0000ff;">PAINT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">838</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\TTITLE.PRG => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>TTITLE:<span style="color: #000000;">TTITLE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">133</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: &nbsp;=> TTITLE:<span style="color: #00C800;">DISPLAY</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\CONTROL.PRG => TTITLE:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1699</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3450</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: &nbsp;=> DIALOGBOXINDIRECT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">DIALOG</span>.PRG => TDIALOG:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">286</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">source</span>\test.prg => MODELLIEMAIL<span style="color: #000000;">&#40;</span> <span style="color: #000000;">167</span> <span style="color: #000000;">&#41;</span></div>[/code:oxr9j37m] I explain you on main I made [code=fw:oxr9j37m]<div class="fw" id="{CB}" style="font-family: monospace;"> <br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">TITLE</span> &nbsp;oTitle <span style="color: #0000ff;">OF</span> oDlgModelli <span style="color: #0000ff;">size</span> <span style="color: #000000;">500</span>, <span style="color: #000000;">40</span> &nbsp;SHADOW NOSHADOW GRADIENT <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>,CLR_WHITE,LIGHTCYAN <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">10</span>, <span style="color: #000000;">12</span> TITLETEXT <span style="color: #0000ff;">OF</span> oTitle <span style="color: #0000ff;">TEXT</span> cTitle <span style="color: #0000ff;">FONT</span> oFontBoldModelli <span style="color: #0000ff;">COLOR</span> CLR_BLACK<br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">38</span>, <span style="color: #000000;">42</span> TITLETEXT <span style="color: #0000ff;">OF</span> oTitle <span style="color: #0000ff;">TEXT</span> cTitle2 <span style="color: #0000ff;">FONT</span> oFontmodelli <span style="color: #0000ff;">COLOR</span> CLR_BLACK<br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">10</span>, oTitle:<span style="color: #000000;">nWidth</span><span style="color: #000000;">-120</span> TITLEIMG &nbsp;oImagetitle &nbsp;<span style="color: #0000ff;">OF</span> oTitle BITMAP cImageTitle TRANSPARENT<br /><br /><br /><br />....<br /><br />oDlgModelli:<span style="color: #000000;">bResized</span> := <span style="color: #000000;">&#123;</span>||Rinfresca_oDlgModelli<span style="color: #000000;">&#40;</span>oBar,oTitle,oImagetitle,oDlgModelli,oLbx,oSay,aGet <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><br /><br />....<br /><br /><span style="color: #00C800;">Function</span> Rinfresca_oDlgModelli<span style="color: #000000;">&#40;</span>oBar,oTitle,oImagetitle,oDlg,oLbx,oSay,aGet <span style="color: #000000;">&#41;</span><br />&nbsp; oTitle:<span style="color: #000000;">nWidth</span>:=oDlg:<span style="color: #000000;">nWidth</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// &nbsp;oTitle:aImgs[ 1 ] = oTitle: &nbsp;// ???</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oTitle:<span style="color: #000000;">aImgs</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> = oTitle:<span style="color: #000000;">nWidth</span><span style="color: #000000;">-120</span><br /><br /><br />&nbsp; oDlg:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br />&nbsp;</div>[/code:oxr9j37m] a snapshot of dialog 1. first step [img:oxr9j37m]http&#58;//www&#46;eoeo&#46;it/wp-content/uploads/2015/05/15&#46;jpg[/img:oxr9j37m] 2. second step ( when I change the size with mouse ) [img:oxr9j37m]http&#58;//www&#46;eoeo&#46;it/wp-content/uploads/2015/05/21&#46;jpg[/img:oxr9j37m]
position of an Image
Silvio, This is the line where it is failing: nBmpWidth = nBmpWidth( ::aImgs[ n, TI_HBMP ] ) I can't understand how you have these values there: Error description: Error BASE/1068 Argument error: array access Args: [ 1] = N 527 !!!!!!!! [ 2] = N 3
position of an Image
try it please ( I rem the refresh for the image on Rinfresca_oDlgModelli function ) [code=fw:3lal2vlb]<div class="fw" id="{CB}" style="font-family: monospace;"><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;">"constant.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"ttitle.ch"</span><br /><br /><span style="color: #00D7D7;">#define</span> &nbsp;LIGHTCYAN &nbsp; &nbsp;nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">203</span>, <span style="color: #000000;">225</span>, <span style="color: #000000;">252</span> <span style="color: #000000;">&#41;</span><br /><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> &nbsp;nBottom &nbsp; := <span style="color: #000000;">29.2</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> &nbsp;nRight &nbsp; &nbsp;:= &nbsp;<span style="color: #000000;">58</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> &nbsp;nWidth &nbsp; &nbsp;:= &nbsp;<span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> nRight * DLG_CHARPIX_W, <span style="color: #000000;">180</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> &nbsp;nHeight &nbsp; := &nbsp;nBottom * DLG_CHARPIX_H<br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> oDlgModelli<br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> oFontmodelli,oFontBoldModelli<br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> cDlgTitle &nbsp;:=<span style="color: #ff0000;">"Family"</span> <br /><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">Local</span> oImagetitle<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">Local</span> oTitle<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">Local</span> cTitle := <span style="color: #ff0000;">"Modelli e-mail"</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">Local</span> cTitle2:= <span style="color: #ff0000;">"Crea nuovi modelli o personalizza quelli esistenti"</span><br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">Local</span> cImageTitle := <span style="color: #ff0000;">"MailModel.bmp"</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFontmodelli <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;">FONT</span> oFontBoldModelli <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">'Tahoma'</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">-12</span> BOLD<br /><br />&nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlgModelli &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">SIZE</span> nWidth, nHeight &nbsp; <span style="color: #0000ff;">PIXEL</span> &nbsp;TRUEPIXEL ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">TITLE</span> cDlgTitle <br /><br />&nbsp;oDlgModelli:<span style="color: #000000;">lHelpIcon</span> := .F.<br />&nbsp;oDlgModelli:<span style="color: #000000;">nStyle</span> &nbsp; &nbsp;:= nOr<span style="color: #000000;">&#40;</span> WS_OVERLAPPED,WS_THICKFRAME,WS_SYSMENU,WS_MAXIMIZEBOX, &nbsp; <span style="color: #000000;">0</span> &nbsp;<span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">TITLE</span> &nbsp;oTitle <span style="color: #0000ff;">OF</span> oDlgModelli <span style="color: #0000ff;">size</span> <span style="color: #000000;">500</span>, <span style="color: #000000;">40</span> &nbsp;SHADOW NOSHADOW GRADIENT <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>,CLR_WHITE,LIGHTCYAN <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">10</span>, <span style="color: #000000;">12</span> TITLETEXT <span style="color: #0000ff;">OF</span> oTitle <span style="color: #0000ff;">TEXT</span> cTitle <span style="color: #0000ff;">FONT</span> oFontBoldModelli <span style="color: #0000ff;">COLOR</span> CLR_BLACK<br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">38</span>, <span style="color: #000000;">42</span> TITLETEXT <span style="color: #0000ff;">OF</span> oTitle <span style="color: #0000ff;">TEXT</span> cTitle2 <span style="color: #0000ff;">FONT</span> oFontmodelli <span style="color: #0000ff;">COLOR</span> CLR_BLACK<br />&nbsp; &nbsp; &nbsp; &nbsp; @ <span style="color: #000000;">10</span>, oTitle:<span style="color: #000000;">nWidth</span><span style="color: #000000;">-120</span> TITLEIMG &nbsp;oImagetitle &nbsp;<span style="color: #0000ff;">OF</span> oTitle BITMAP cImageTitle TRANSPARENT<br /><br />&nbsp; &nbsp;oDlgModelli:<span style="color: #000000;">bResized</span> := <span style="color: #000000;">&#123;</span>||Rinfresca_oDlgModelli<span style="color: #000000;">&#40;</span>oTitle,oImagetitle,oDlgModelli <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlgModelli &nbsp;<span style="color: #0000ff;">centered</span><br />&nbsp; &nbsp; oFontmodelli:<span style="color: #0000ff;">Release</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; oFontBoldModelli:<span style="color: #0000ff;">Release</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><span style="color: #B900B9;">//-----------------------------------------------------------------------------------//</span><br /><span style="color: #00C800;">Function</span> Rinfresca_oDlgModelli<span style="color: #000000;">&#40;</span>oTitle,oImagetitle,oDlg<span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #B900B9;">//title</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oTitle:<span style="color: #000000;">nWidth</span>:=oDlg:<span style="color: #000000;">nWidth</span><br /><br /><span style="color: #B900B9;">//image</span><br />* &nbsp;oImagetitle:<span style="color: #000000;">nLeft</span>:=oTitle:<span style="color: #000000;">nWidth</span><span style="color: #000000;">-120</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* oTitle:<span style="color: #000000;">aImgs</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> = nRow<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* oTitle:<span style="color: #000000;">aImgs</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> = oTitle:<span style="color: #000000;">nWidth</span><span style="color: #000000;">-120</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oTitle:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp;*oDlg:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:3lal2vlb]
position of an Image
[b:3jmp07sk]Antonio, I found the solution !!![/b:3jmp07sk] oTitle:[b:3jmp07sk]aImgs[1][ 2 ] [/b:3jmp07sk]= oTitle:nWidth-120 oTitle:Refresh()
position of an Image
very good <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
posizione di righe inserite con tcBrowse
ciao, a tuttti, ho un archivio dbf gestito con tcBrowse (xHarbour 1.0.0 + fw 7.12) a cui aggiungo linee con 'drag and drop' da un altro archivio. per inserire la linea nel dbase ricevente copio le righe dal punto di inserimento alla fine del file in un archivio temporaneo, cancello le righe copiate, aggiungo la riga vuota e riappendo le linee salvate. vorrei fare in modo che la linea inserita si veda effettivamente comparire nel punto in cui rilascio il mouse e tutte le linee sottostanti si spostano giù di una posizione. spesso questo non succede e la pagina scrolla un pò più su o giù, dando l'impressione di malfunzionamento anche se la linea inserita è effettivamente al posto giusto con il fuoco. non ci sono indici in uso. grazie in anticipo, marzio
possible bug at FW_CreateMDB( cDb )?
Mr Lucas There is no close method for ADOX.Catalog object. If the create action succeeds oCat:ActiveConnection has a valid ADODB.Connection in open state. It seems to be a good idea to close it. When the create action fails, oCat:ActiveConnection is nil. Catalog object itself will be cleaned by harbour's garbase collection mechanism once there is no variable referencing to that object.
possible bug at FW_CreateMDB( cDb )?
Hello, In this function, the oCat should not be closed before ending the function?. Thank you.
possible bug in Richedit [solved]
Hi, In this sample: <!-- m --><a class="postlink" href="http://demo.ovh.com/es/81548502201e3f47dfb098a73bc8423d/">http://demo.ovh.com/es/81548502201e3f47 ... 73bc8423d/</a><!-- m --> When it loads the text, all is selected as picture shows: [url=http&#58;//img545&#46;imageshack&#46;us/i/errorit&#46;png/:3sng5u7w][img:3sng5u7w]http&#58;//img545&#46;imageshack&#46;us/img545/3453/errorit&#46;png[/img:3sng5u7w][/url:3sng5u7w] Uploaded with [url=http&#58;//imageshack&#46;us:3sng5u7w]ImageShack.us[/url:3sng5u7w] I want to avoid this uggly effect. I also have tried [code=fw:3sng5u7w]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> ;<br /><span style="color: #0000ff;">on</span> <span style="color: #0000ff;">init</span> <span style="color: #000000;">&#40;</span> oRich:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> MemoRead<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"rtf.prg"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, oRich:<span style="color: #000000;">GotoLine</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /> </div>[/code:3sng5u7w] but it does nothing. Any clue please?. Thank you <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->
possible bug in Richedit [solved]
[code=fw:ft0oe88m]<div class="fw" id="{CB}" style="font-family: monospace;">oDlg:<span style="color: #000000;">bStart</span> = <span style="color: #000000;">&#123;</span> || oRich:<span style="color: #000000;">SetPos</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span></div>[/code:ft0oe88m] EMG
possible bug in Richedit [solved]
Thank you very much.
possible changing BtnBmp-gradient at runtime ?
Is it possible to change the gradient of BtnBmp at runtime ? I tested to change the color on button-action, but doesn't work. Maybe I have to destroy the button and rebuild ? [b:285px3eu]The button I want to change the gradient :[/b:285px3eu] REDEFINE BTNBMP oBtn[10] OF oDlg2 UPDATE ; ID 900 PIXEL 2007 ; NOBORDER ; PROMPT "&BUTTON-test" ; ACTION oDlg2:End() ; FONT oFont1 ; LEFT oBtn[10]:lTransparent := .t. oBtn[10]:cToolTip = { "Gradient" + CRLF + "Test","Button-gradient", 1, CLR_BLACK, 14089979 } oBtn[10]:SetColor( 0, )[color=#0000FF:285px3eu] [b:285px3eu]oBtn[10]:bClrGrad = { | lMouseOver | If( ! lMouseOver,; { { 0.50, 12434811, 16777215 }, ; { 0.50, 16777215, 12434811 } }, ; { { 0.50, 255, 16777215 }, ; { 0.50, 16777215, 255 } } ) }[/b:285px3eu][/color:285px3eu] [b:285px3eu]New colors of button 10 on action of button 3[/b:285px3eu] REDEFINE BTNBMP oBtn[3] OF oDlg2 ; ID 230 PIXEL 2007 ; NOBORDER ; PROMPT "&1. Color " ; FILENAME c_path1 + "Paint.Bmp" ; ACTION ( nBColorF1 := ChooseColor(), oBmp[4]:Refresh(), ; [color=#FF0000:285px3eu][b:285px3eu]oBtn[10]:EraseBkGnd( hDC ), ; // NO effect ! oBtn[10]:bClrGrad = { | lMouseOver | If( ! lMouseOver,; { { 0.50, nBColorF1, nBColorB1 }, ; { 0.50, nBColorB1, nBColorF1 } }, ; { { 0.50, nBColorF2, nBColorB2 }, ; { 0.50, nBColorB2, nBColorF2 } } ) }, ; oBtn[10]:Refresh(), [/b:285px3eu][/color:285px3eu] ) ; // NO effect !!! FONT oFont1 ; LEFT oBtn[3]:lTransparent := .t. oBtn[3]:cToolTip = { "1. Button-Gradient" + CRLF + "Color","Color-Selection", 1, CLR_BLACK, 14089979 } oBtn[3]:SetColor( 0, ) best regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
possible changing BtnBmp-gradient at runtime ?
You can change at runtime. You do not need to rebuild the button.
possible changing BtnBmp-gradient at runtime ?
That is, what I'm trying to do : ( the dialog I'm working on ) The original button-colors [img:op2wfl0g]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Btnbmp1&#46;jpg[/img:op2wfl0g] The changed colors. No refresh of the testbutton. [img:op2wfl0g]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Btnbmp2&#46;jpg[/img:op2wfl0g] best regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
possible changing BtnBmp-gradient at runtime ?
Mr. Rao, it works fine now. Just a symple REFRESH needed. I forgot using vars inside the testbutton. ( late at night, I lost my concentration ) [b:3a867vtu]The used vars :[/b:3a867vtu] [b:3a867vtu]nBColorF1 := 12434811 nBColorB1 := 16777215 nBGradPos1 := 0.50 nBColorF2 := 255 nBColorB2 := 16777215 nBGradPos2 := 0.50[/b:3a867vtu] REDEFINE BTNBMP [color=#FF0000:3a867vtu][b:3a867vtu]oBtn[10][/b:3a867vtu][/color:3a867vtu] OF oDlg2 UPDATE ; ID 900 PIXEL 2007 ; NOBORDER ; PROMPT "&BUTTON-test" ; ACTION oDlg2:End() ; FONT oFont1 ; LEFT oBtn[10]:lTransparent := .t. oBtn[10]:cToolTip = { "Gradient" + CRLF + "Test","Button-gradient", 1, CLR_BLACK, 14089979 } oBtn[10]:SetColor( 0, ) [color=#0000FF:3a867vtu][b:3a867vtu]oBtn[10]:bClrGrad = { | lMouseOver | If( ! lMouseOver,; { { nBGradPos1, nBColorF1, nBColorB1 }, ; { nBGradPos1, nBColorB1, nBColorF1 } }, ; { { nBGradPos2, nBColorF2, nBColorB2 }, ; { nBGradPos2, nBColorB2, nBColorF2 } } ) }[/b:3a867vtu][/color:3a867vtu] [b:3a867vtu]Selections ( 4 colors ) from button 3 - 6[/b:3a867vtu] REDEFINE BTNBMP oBtn[3] OF oDlg2 ; ID 230 PIXEL 2007 ; NOBORDER ; PROMPT "&1. Color " ; FILENAME c_path1 + "Paint.Bmp" ; ACTION ( nBColorF1 := ChooseColor(), oBmp[4]:Refresh(), ; [color=#FF0000:3a867vtu][b:3a867vtu]oBtn[10]:Refresh()[/b:3a867vtu][/color:3a867vtu] , oBMP[6]:Refresh(), oGet[3]:Refresh() ) ; FONT oFont1 ; LEFT oBtn[3]:lTransparent := .t. oBtn[3]:cToolTip = { "1. Dlg-Gradient" + CRLF + "Color","Color-Selection", 1, CLR_BLACK, 14089979 } oBtn[3]:SetColor( 0, ) best regards Uwe <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
possible with xBrowse?
Hello. I would like to know if it is possible to do with xBrowse, so results are updated in runtime mode: [url=http&#58;//imageshack&#46;us/photo/my-images/855/xbrowse&#46;png/:2xq8rbdj][img:2xq8rbdj]http&#58;//img855&#46;imageshack&#46;us/img855/9222/xbrowse&#46;png[/img:2xq8rbdj][/url:2xq8rbdj] Uploaded with [url=http&#58;//imageshack&#46;us:2xq8rbdj]ImageShack.us[/url:2xq8rbdj] See video: [url:2xq8rbdj]http&#58;//www&#46;mediafire&#46;com/?dxm8190tuai1yem[/url:2xq8rbdj] Thanks <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->
possible with xBrowse?
I prepared a sample for Incremental Filter using \fwh\samples\customer.dbf. The incremental filter is applied to the field "FIRST". You may test this on customer.dbf first and then adopt to your dbf structure and requirements. [code=fw:1lww2dqh]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'fivewin.ch'</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'ord.ch'</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'xbrowse.ch'</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'hbcompat.ch'</span><br /><br />REQUEST DBFCDX<br /><br /><span style="color: #00C800;">static</span> cSeek   := <span style="color: #ff0000;">''</span><br /><span style="color: #00C800;">static</span> oSeek<br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oDlg, oBrw<br /><br />   RDDSETDEFAULT<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"DBFCDX"</span> <span style="color: #000000;">&#41;</span><br />   USE CUSTOMER<br />   SET ORDER <span style="color: #0000ff;">TO</span> TAG FIRST<br />   GO TOP<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">600</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span><br />   @ <span style="color: #000000;">30</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;">-10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />      <span style="color: #0000ff;">AUTOCOLS</span> <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"CUSTOMER"</span> CELL LINES NOBORDER<br /><br />   @ <span style="color: #000000;">10</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> oSeek <span style="color: #0000ff;">PROMPT</span> cSeek <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> ;<br />      <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">COLOR</span> CLR_BLACK,CLR_YELLOW<br /><br />   oBrw:<span style="color: #000000;">bSeek</span>  := <span style="color: #00C800;">nil</span>   <br /><br />   oBrw:<span style="color: #000000;">bKeyChar</span>  := <span style="color: #000000;">&#123;</span> |nKey| KeyChar<span style="color: #000000;">&#40;</span> oBrw, nKey <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />   oBrw:<span style="color: #000000;">CreateFromCode</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 /><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> KeyChar<span style="color: #000000;">&#40;</span> oBrw, nKey <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">If</span> nKey == VK_BACK .and. ! Empty<span style="color: #000000;">&#40;</span> cSeek <span style="color: #000000;">&#41;</span><br />      <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> IncrFilter<span style="color: #000000;">&#40;</span> oBrw, <span style="color: #0000ff;">Left</span><span style="color: #000000;">&#40;</span> cSeek, Len<span style="color: #000000;">&#40;</span> cSeek <span style="color: #000000;">&#41;</span> <span style="color: #000000;">-1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span><br />   elseIf nKey > <span style="color: #000000;">31</span><br />      <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> IncrFilter<span style="color: #000000;">&#40;</span> oBrw, cSeek + Chr<span style="color: #000000;">&#40;</span> nKey <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span><br />   <span style="color: #00C800;">Endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> IncrFilter<span style="color: #000000;">&#40;</span> oBrw, cPattern <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> cFilter, lFound := .f.<br />   <span style="color: #00C800;">local</span> nRecNo, cSaveFilt, lStay<br /><br />   <span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> cPattern <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'C'</span><br />      <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">&#40;</span> cPattern <span style="color: #000000;">&#41;</span><br />         cSeek       := <span style="color: #ff0000;">""</span><br />         oSeek:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> cSeek <span style="color: #000000;">&#41;</span><br />         SET FILTER <span style="color: #0000ff;">TO</span> !DELETED<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         GO TOP<br />         oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         lFound      := .t.<br />      <span style="color: #00C800;">else</span><br />         cFilter     := <span style="color: #ff0000;">'WildMatch( "*'</span> + Upper<span style="color: #000000;">&#40;</span>cPattern<span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">'*", UPPER( FIRST )) .AND. !DELETED()'</span><br />         cSaveFilt   := DBFILTER<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         nRecNo      := RECNO<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         lStay       := &cFilter<br />         SET FILTER <span style="color: #0000ff;">TO</span> &cFilter<br />         GO TOP<br />         <span style="color: #00C800;">if</span> OrdKeyCount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> == <span style="color: #000000;">0</span><br />            SET FILTER <span style="color: #0000ff;">TO</span> &cSaveFilt<br />            GO TOP<br />            DBGOTO<span style="color: #000000;">&#40;</span> nRecNo <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">else</span><br />            cSeek    := cPattern<br />            oSeek:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> cSeek <span style="color: #000000;">&#41;</span><br />            <span style="color: #00C800;">if</span> lStay<br />               DBGOTO<span style="color: #000000;">&#40;</span> nRecNo <span style="color: #000000;">&#41;</span><br />               oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />            <span style="color: #00C800;">else</span><br />               oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span> .t. <span style="color: #000000;">&#41;</span><br />            <span style="color: #00C800;">endif</span><br />            lFound   := .t.<br />         <span style="color: #00C800;">endif</span><br />      <span style="color: #00C800;">endif</span><br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> lFound<br /> </div>[/code:1lww2dqh] Instead of using WildMatch function we could use simple "$" also. But by using WildMatch function, the user can enter wildcard character "?" inside the search expression.
possible with xBrowse?
Thank you very much. It works perfect. xBrowse is too much powerfull!!!.
possible with xBrowse?
[quote:1tq3pl3b]xBrowse is too much powerfull!!! [/quote:1tq3pl3b] Will become more powerful. Incremental filters like the above will be provided natively in the XBrowse from the next version. Then the application code to achieve the above can be as small as: [code=fw:1tq3pl3b]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'fivewin.ch'</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'ord.ch'</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'xbrowse.ch'</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'hbcompat.ch'</span><br /><br />REQUEST DBFCDX<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oDlg, oBrw<br /><br />   RDDSETDEFAULT<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"DBFCDX"</span> <span style="color: #000000;">&#41;</span><br />   USE CUSTOMER<br />   SET ORDER <span style="color: #0000ff;">TO</span> TAG FIRST<br />   GO TOP<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">600</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span><br /><br />   @ <span style="color: #000000;">30</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;">-10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />      <span style="color: #0000ff;">AUTOCOLS</span> AUTOSORT <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"CUSTOMER"</span> CELL LINES NOBORDER<br /><br />   oBrw:<span style="color: #000000;">lIncrFilter</span>  := .t.<br />   oBrw:<span style="color: #000000;">lSeekWild</span>    := .t.<br /><br />   @ <span style="color: #000000;">10</span>,<span style="color: #000000;">10</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;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> ;<br />      <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">COLOR</span> CLR_BLACK,CLR_YELLOW <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">'@!'</span><br /><br />   oBrw:<span style="color: #000000;">CreateFromCode</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 /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /> </div>[/code:1tq3pl3b]
possible with xBrowse?
Incredible, Mr. Rao. Also, to search the entire DB: cFilter := 'hb_WildMatch( "*' + Upper(cPattern) + '*", DbRecordInfo( 9 ))' But in ADS does not work, it says: Error ADSCDX/0 Operation not supported I think it will be very interesting to search in the entire db. I would like to congratulate you for all the extraordinary work done with xBrowse, and especially your kindness to answer and explain in the forums. A gentleman and great master.
possible with xBrowse?
Thanks for reminding me about ADS. I realize the need to distinguish ADS in the code under development. For ADS, particularly client server implementation with large tables, it is desirable that the filter expression can be resolved on the server and if possible optimized. Instead of using wildmatch function, better to use <expr> $ <fld1>[ + <fld2> ...]. Though this expression is not optimized, used to give me reasonable results on large tables. For full search, the filter expression you proposed is good for DBFCDX. For ADS, we may better use the FTS syntax and depend on the ADS's beautiful FTS capability
possible with xBrowse?
Thank you very much. Which is please the equivalent in ADS for cFilter := 'hb_WildMatch( "*' + Upper(cPattern) + '*", DbRecordInfo( 9 ))' , so I can search in all fieds ? Thank you.
possible with xBrowse?
Mr Nao, Thank you very much for this very interesting sample. I would like to know if it is possible to use a Get instead of a Say, because it is easier for customers, but the same behaviour (if I press S, it should filter records contaning S, if I add SA, filter with SA...).
possible with xBrowse?
Hello. Is possible to use a Get? Thank you.
possible with xBrowse?
Hello. As I use a ribbon bar for add, delete, search, print, etc options, when a user clicks on it, focus is not on Say, or if the user press F1, say does not work. That´s why I need Get, but it does not work, as ON CHANGE clause returns penultimate character, not last, so it does not work. Any clue?. Thank you.
possible with xBrowse?
[quote="ukservice":31lc44ih]Hello. Is possible to use a Get? Thank you.[/quote:31lc44ih] I think it can be possible only you must change also the oSeek:SetText( cSeek ) I 'm thinking with oSeek:cText( cSeek ) oSeek:REFRESH()
possible with xBrowse?
Hello. I would appreciate an answer. Thank you very much.
possible with xBrowse?
On ribbon I use TSSAY class run ok instead on ADD BUTTON SAYBUTTON it is not transparent
possible with xBrowse?
TRY IT HERE RUN OK version with A get [code=fw:3qep0cpo]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'fivewin.ch'</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'ord.ch'</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'xbrowse.ch'</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'hbcompat.ch'</span><br /><br />REQUEST DBFCDX<br /><br /><span style="color: #00C800;">static</span> cSeek &nbsp; := <span style="color: #ff0000;">''</span><br /><span style="color: #00C800;">static</span> oSeek<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> oDlg, oBrw<br /><br />&nbsp; &nbsp;RDDSETDEFAULT<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"DBFCDX"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;USE CUSTOMER<br />&nbsp; &nbsp;SET ORDER <span style="color: #0000ff;">TO</span> TAG FIRST<br />&nbsp; &nbsp;GO TOP<br /><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;">600</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">30</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;">-10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">AUTOCOLS</span> <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"CUSTOMER"</span> CELL LINES NOBORDER<br /><br />&nbsp; * @ <span style="color: #000000;">10</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> oSeek <span style="color: #0000ff;">PROMPT</span> cSeek <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> ;<br />&nbsp; &nbsp;* &nbsp; <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">COLOR</span> CLR_BLACK,CLR_YELLOW<br /><br />&nbsp; &nbsp; &nbsp;@ <span style="color: #000000;">10</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">GET</span> oSeek <span style="color: #0000ff;">VAR</span> cSeek <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">PIXEL</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">COLOR</span> CLR_BLACK,CLR_YELLOW<br /><br />&nbsp; &nbsp; &nbsp; &nbsp;oSeek:<span style="color: #000000;">bKeyDown</span> := <span style="color: #000000;">&#123;</span> | nKey | KeyChar<span style="color: #000000;">&#40;</span> oBrw, nKey <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">bSeek</span> &nbsp;:= <span style="color: #00C800;">nil</span> &nbsp; <br /><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">bKeyChar</span> &nbsp;:= <span style="color: #000000;">&#123;</span> |nKey| KeyChar<span style="color: #000000;">&#40;</span> oBrw, nKey <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><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> KeyChar<span style="color: #000000;">&#40;</span> oBrw, nKey <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">If</span> nKey == VK_BACK .and. ! Empty<span style="color: #000000;">&#40;</span> cSeek <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> IncrFilter<span style="color: #000000;">&#40;</span> oBrw, <span style="color: #0000ff;">Left</span><span style="color: #000000;">&#40;</span> cSeek, Len<span style="color: #000000;">&#40;</span> cSeek <span style="color: #000000;">&#41;</span> <span style="color: #000000;">-1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span><br />&nbsp; &nbsp;elseIf nKey > <span style="color: #000000;">31</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> IncrFilter<span style="color: #000000;">&#40;</span> oBrw, cSeek + Chr<span style="color: #000000;">&#40;</span> nKey <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #000000;">0</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Endif</span><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> IncrFilter<span style="color: #000000;">&#40;</span> oBrw, cPattern <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cFilter, lFound := .f.<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nRecNo, cSaveFilt, lStay<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ValType<span style="color: #000000;">&#40;</span> cPattern <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'C'</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">&#40;</span> cPattern <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cSeek &nbsp; &nbsp; &nbsp; := <span style="color: #ff0000;">""</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* oSeek:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> cSeek <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oSeek:<span style="color: #000000;">cText</span><span style="color: #000000;">&#40;</span> cSeek <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oSeek:<span style="color: #0000ff;">REFRESH</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SET FILTER <span style="color: #0000ff;">TO</span> !DELETED<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GO TOP<br />&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;lFound &nbsp; &nbsp; &nbsp;:= .t.<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cFilter &nbsp; &nbsp; := <span style="color: #ff0000;">'WildMatch( "*'</span> + Upper<span style="color: #000000;">&#40;</span>cPattern<span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">'*", UPPER( FIRST )) .AND. !DELETED()'</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cSaveFilt &nbsp; := DBFILTER<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nRecNo &nbsp; &nbsp; &nbsp;:= RECNO<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lStay &nbsp; &nbsp; &nbsp; := &cFilter<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SET FILTER <span style="color: #0000ff;">TO</span> &cFilter<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GO TOP<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> OrdKeyCount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> == <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SET FILTER <span style="color: #0000ff;">TO</span> &cSaveFilt<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GO TOP<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DBGOTO<span style="color: #000000;">&#40;</span> nRecNo <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cSeek &nbsp; &nbsp;:= cPattern<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oSeek:<span style="color: #000000;">cText</span><span style="color: #000000;">&#40;</span> cSeek <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oSeek:<span style="color: #0000ff;">REFRESH</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> lStay<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DBGOTO<span style="color: #000000;">&#40;</span> nRecNo <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span> .t. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lFound &nbsp; := .t.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> lFound<br />&nbsp;</div>[/code:3qep0cpo]
possible with xBrowse?
Mr. Nao, Thank you very much for your answer. Also, please look at Windows 7 style, this is important as I can´t modify this to my users as they are used to previous Windows 7 stryle behaviour.
possible with xBrowse?
Mr. Mda, Thank you but with get does not work. Please try to type in the xbrowse area, then go to get and erase and type again. Hope Mr. Rao checks it.
possible with xBrowse?
[quote="ukservice":tebozvzt]Mr. Mda, Thank you but with get does not work. Please try to type in the xbrowse area, then go to get and erase and type again. Hope Mr. Rao checks it.[/quote:tebozvzt] I can not do it with Get as of now.
possible xBrowse-refresh with another Dbf ?
James, the problem : there are < [b:10d7bxzv]12[/b:10d7bxzv] > Files created on another part, 1 for each month I cannot make just 1 file and using scope for a month. I must define different files for the browser 2 best regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
possible xBrowse-refresh with another Dbf ?
[quote="ukoenig":1ectyzg7]Hello, is it possible to refresh a xbrowse with another DBF ( same structure ) ? With this sample I open the month JUNE [img:1ectyzg7]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Win10_3&#46;jpg[/img:1ectyzg7] I'm starting with a defined month 12 month are possible to display in browser 2 there is a RELATION between browser 1 and 2 ( names ) I would like to change the month in browser 2 [size=150:1ectyzg7]Browser 1 ( names )[/size:1ectyzg7] [color=#0000FF:1ectyzg7]DBSELECTAREA( "KUNDE" ) ( "KUNDE" )->(DBSETORDER( "KUNDE1" )) ( "KUNDE" )->( ORDSETRELATION( cMonat, { || UPPER(NAME1 + NAME) }, "UPPER(NAME1 + NAME)" ) ) ( "KUNDE" )->( DBGOTOP() )[/color:1ectyzg7] [size=150:1ectyzg7]Browser 2 ( month with relation on names )[/size:1ectyzg7] [color=#0000FF:1ectyzg7]DBSELECTAREA( cMonat ) ( cMonat )->(DBSETORDER( cMonat )) ( cMonat )->( DBGOTOP() )[/color:1ectyzg7] best regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->[/quote:1ectyzg7] Hi, Uwe. Try to change the xBrowse alias y refresh the xBrowse. example: REDEFINE XBROWSE oBrw ID.... COLUMNS.... ; ALIAS cAlias On click button July... oBrw:cAlias:= "JULY" oBrw:Refresh() etc. I Hope this may helps. Regards.
possible xBrowse-refresh with another Dbf ?
Unless you have millions of records, I can't see any good reason to have a different file for each month. Doesn't that also mean you have to have 12 for each year also? I would think that makes things more complicated that they would be if they were all in the same file. However, since you do, just close the file for the month in use and open the one for the month desired and refresh the browse. Well, you would have to be using database objects for it to be that simple. Otherwise you might be able to give all the month files the same alias when you open them so the browse still thinks it is using the same file. James Update: I see Francisco was writing a response while I was writing mine. And I see he had the same suggestion.
possible xBrowse-refresh with another Dbf ?
Hello, is it possible to refresh a xbrowse with another DBF ( same structure ) ? With this sample I open the month JUNE [img:3429yrys]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Win10_3&#46;jpg[/img:3429yrys] I'm starting with a defined month 12 month are possible to display in browser 2 there is a RELATION between browser 1 and 2 ( names ) I would like to change the month in browser 2 [size=150:3429yrys]Browser 1 ( names )[/size:3429yrys] [color=#0000FF:3429yrys]DBSELECTAREA( "KUNDE" ) ( "KUNDE" )->(DBSETORDER( "KUNDE1" )) ( "KUNDE" )->( ORDSETRELATION( cMonat, { || UPPER(NAME1 + NAME) }, "UPPER(NAME1 + NAME)" ) ) ( "KUNDE" )->( DBGOTOP() )[/color:3429yrys] [size=150:3429yrys]Browser 2 ( month with relation on names )[/size:3429yrys] [color=#0000FF:3429yrys]DBSELECTAREA( cMonat ) ( cMonat )->(DBSETORDER( cMonat )) ( cMonat )->( DBGOTOP() )[/color:3429yrys] best regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
possible xBrowse-refresh with another Dbf ?
Uwe, Well, I'm not sure exactly what you are trying to do, but whatever the trigger is for the first browse, use that to set the scope of the second browse. If that is not what you were looking for, then please explain in more detail. james
possible xBrowse-refresh with another Dbf ?
James, using the < month-button >, I want to replace the data in browser 2 sample : starting with june the JUNE.dbf is shown in browser 2 On button-action like using JULY I want to change the data in browser 2 to JULY I could zap the first data in browser 2 ( June ) and append from July ? best regards uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
possible xBrowse-refresh with another Dbf ?
Uwe, [quote:uw6xqtz0]I could zap the first data in browser 2 ( June ) and append from July ?[/quote:uw6xqtz0] You should just be using scopes with the entire database. Then all you have to do is change the scope on the second browse and refresh it. Just index the database on month, then set the scope to that month and refresh the browse. James
possible xBrowse-refresh with another Dbf ?
James, Francisco thank You very much. records are no problems, because it only can be a maximum of round about 200 records ( writing bills of a month ) One solution I got working. I will test the others to find out the best one to keep. best regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
possible xBrowse-refresh with another Dbf ?
Hello, still my old problem using one xbrowse and changing the workarea. I have to use a EXTRA statistic-file for each month. Define a new Alias on button-selection doesn't work. Tested oBrw1:cAlias := cUmsName ( new DBF ) as well. It works only once on startup. Using BROWSE() it shows the change-result but xBrowse doesn't accept the DBF-change. [img:rl9uybzg]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Alias1&#46;jpg[/img:rl9uybzg] [img:rl9uybzg]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Alias2&#46;jpg[/img:rl9uybzg] [color=#0000FF:rl9uybzg]REDEFINE XBROWSE oBrw1 ID 110 OF oFld:aDialogs[ 1 ] AUTOSORT FASTEDIT ; COLUMNS { "NACHNAME", "VORNAME", ; "KOST_RZH", "KOST_PRI", "KOST_BEI", ; "KRK", "KRX", ; "PFK0", "PFX0", "PFK1", "PFX1", "PFK2", "PFX2", "PFK3", "PFX3", ; "B1X", "PBK", "PBX", "B2X", ; "PRA", "VPK", "VPX", "PRI", "BERG", "SUMME", "PKT_SUMME" } ; ALIAS[/color:rl9uybzg] [color=#FF0000:rl9uybzg][b:rl9uybzg]cUmsName[/b:rl9uybzg][/color:rl9uybzg] [color=#0000FF:rl9uybzg]UPDATE[/color:rl9uybzg] [color=#FF0000:rl9uybzg][b:rl9uybzg]cUmsName[/b:rl9uybzg][/color:rl9uybzg] to be changed on button-action maybe something missing ? best regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
possible xBrowse-refresh with another Dbf ?
Uwe: I extracted this partial code , from my accounting program. I tried it before post it here , and it works for me. Maybe it will be of some help. All necessary tables have been open at program startup . All tables have the same structure. Regards. [code=fw:2zeb7fu9]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">//------------------------------</span><br /><span style="color: #00C800;">FUNCTION</span> Transacc<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> oDlg, oLbx<br /><span style="color: #00C800;">LOCAL</span> cTitulo:=<span style="color: #ff0000;">"TRANSACCIONES"</span><br /><span style="color: #00C800;">local</span> cDocum := <span style="color: #ff0000;">'CD'</span>   <span style="color: #B900B9;">//Por defecto sera comprobantes de diario</span><br /><span style="color: #00C800;">local</span> cAlias<br /><span style="color: #00C800;">local</span> oDoc1,oDoc2,oDoc3,oDoc4,oDoc8, oCol<br /><br />dbselectarea<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"comprobd"</span><span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">//el primer boton es comprobantes de diario</span><br /><span style="color: #00C800;">if</span> comprobd-><span style="color: #000000;">&#40;</span>bof<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> .or. comprobd-><span style="color: #000000;">&#40;</span>eof<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />   comprobd-><span style="color: #000000;">&#40;</span>dbgotop<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">endif</span><br />cAlias:=<span style="color: #0000ff;">Alias</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><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;">"Grabar2"</span> <span style="color: #0000ff;">TITLE</span> cTitulo<br /><br />  dbselectar<span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span><br /><br />  oLbx := TXBrowse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oDlg <span style="color: #000000;">&#41;</span> <br />  oLbx:<span style="color: #000000;">cAlias</span>:=<span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span><br /><br />  oCol = oLbx:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />  oCol:<span style="color: #000000;">bStrData</span> = <span style="color: #000000;">&#123;</span> || DtoC<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>->Fechemis<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />  oCol:<span style="color: #000000;">nDataStrAlign</span> := <span style="color: #000000;">1</span><br />  oCol:<span style="color: #000000;">cHeader</span> = <span style="color: #ff0000;">"Fecha"</span> <br />  oCol:<span style="color: #000000;">nWidth</span> = <span style="color: #000000;">66</span><br /><br />  oCol = oLbx:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />  oCol:<span style="color: #000000;">bStrData</span> = <span style="color: #000000;">&#123;</span> || Transform<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>->NumDoc,<span style="color: #ff0000;">"9999999999"</span><span style="color: #000000;">&#41;</span>  <span style="color: #000000;">&#125;</span><br />  oCol:<span style="color: #000000;">cHeader</span> = <span style="color: #ff0000;">"Documento"</span> <br />  oCol:<span style="color: #000000;">nWidth</span> = <span style="color: #000000;">70</span><br />  oCol:<span style="color: #000000;">nFootStrAlign</span> := <span style="color: #000000;">1</span><br /><br />  oCol = oLbx:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />  oCol:<span style="color: #000000;">bStrData</span> = <span style="color: #000000;">&#123;</span> || TRANSFORM<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>->Debe,<span style="color: #ff0000;">"@Z 99,999,999,999.99"</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />  oCol:<span style="color: #000000;">nDataStrAlign</span> := <span style="color: #000000;">1</span><br />  oCol:<span style="color: #000000;">cHeader</span> = <span style="color: #ff0000;">"Debitos"</span> <br />  oCol:<span style="color: #000000;">nWidth</span> = <span style="color: #000000;">100</span><br /><br />  oCol = oLbx:<span style="color: #000000;">AddCol</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />  oCol:<span style="color: #000000;">bStrData</span> = <span style="color: #000000;">&#123;</span> || TRANSFORM<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>->Haber, <span style="color: #ff0000;">"@Z 99,999,999,999.99"</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />  oCol:<span style="color: #000000;">nDataStrAlign</span> := <span style="color: #000000;">1</span><br />  oCol:<span style="color: #000000;">cHeader</span> = <span style="color: #ff0000;">"Creditos"</span> <br />  oCol:<span style="color: #000000;">nWidth</span> = <span style="color: #000000;">100</span><br /><br />  oLbx:<span style="color: #000000;">CreateFromResource</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">181</span><span style="color: #000000;">&#41;</span> <br />  oLbx:<span style="color: #000000;">SetRDD</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /><br /><br /><span style="color: #B900B9;">//Tipo de Documentos</span><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oDoc1 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">221</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"cdiario"</span>   <span style="color: #0000ff;">LEFT</span> <span style="color: #000000;">2007</span>  <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> dbSelectArea<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"comprobd"</span><span style="color: #000000;">&#41;</span>, cAlias:=<span style="color: #0000ff;">Alias</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oLbx:<span style="color: #000000;">cAlias</span>:=cAlias,oLbx:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, cDocum := <span style="color: #ff0000;">'CD'</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oDoc2 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">222</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"RCAJARJ2"</span>  <span style="color: #0000ff;">LEFT</span> <span style="color: #000000;">2007</span>  <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> dbSelectArea<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"RecibCaj"</span><span style="color: #000000;">&#41;</span>, cAlias:=<span style="color: #0000ff;">Alias</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oLbx:<span style="color: #000000;">cAlias</span>:=cAlias,oLbx:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, cDocum := <span style="color: #ff0000;">'RJ'</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oDoc3 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">223</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"MINUTAS"</span>   <span style="color: #0000ff;">LEFT</span> <span style="color: #000000;">2007</span>  <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> dbSelectArea<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Minutas"</span><span style="color: #000000;">&#41;</span>,  cAlias:=<span style="color: #0000ff;">Alias</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oLbx:<span style="color: #000000;">cAlias</span>:=cAlias,oLbx:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, cDocum := <span style="color: #ff0000;">'MI'</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oDoc4 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">224</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"CHEQUES"</span>   <span style="color: #0000ff;">LEFT</span> <span style="color: #000000;">2007</span>  <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> dbSelectArea<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"cheques"</span><span style="color: #000000;">&#41;</span>,  cAlias:=<span style="color: #0000ff;">Alias</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oLbx:<span style="color: #000000;">cAlias</span>:=cAlias,oLbx:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, cDocum := <span style="color: #ff0000;">'CH'</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oDoc8 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">228</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"SALIR"</span>     <span style="color: #0000ff;">LEFT</span> <span style="color: #000000;">2007</span>  <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />  <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span>  <br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:2zeb7fu9]