topic
stringlengths
1
63
text
stringlengths
1
577k
setcolor on a get with a conditional checkbox
[quote="Daniel Garcia-Gil":3bc4zuaj]deactivate lDisColors and use nClrTextDis and nClrPaneDis[/quote:3bc4zuaj] Of course. My fault. EMG
setcolor on a get with a conditional checkbox
Daniel and Enrico Thank you both for your help !! Rick
setenvironmentVariable() de xH a H
Saludos Foro Esta función la usaba con xHarbour 1.2.3. y ahora con Harbour 3.0 me marca errores [code=fw:2co01xfn]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><br /><span style="color: #00D7D7;">#include</span> <windows.h><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> SETENVIRONMENTVARIABLE <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   hb_retl<span style="color: #000000;">&#40;</span> SetEnvironmentVariable<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span>LPCSTR<span style="color: #000000;">&#41;</span> hb_parcx<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>,<br />                                     <span style="color: #000000;">&#40;</span>LPCSTR<span style="color: #000000;">&#41;</span> hb_parcx<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />                                     <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;<br /><span style="color: #000000;">&#125;</span><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP<br /> </div>[/code:2co01xfn] Warning W8065 MAUFUNC.PRG 166: Call to function 'hb_parcx' with no prototype in function HB_FUN_SETENVIRONMENTVARIABLE Warning W8065 MAUFUNC.PRG 167: Call to function 'hb_parcx' with no prototype in function HB_FUN_SETENVIRONMENTVARIABLE Warning W8065 MAUFUNC.PRG 168: Call to function 'hb_retl' with no prototype in function HB_FUN_SETENVIRONMENTVARIABLE Error E2356 F:\Harbour\Include\hbapi.h 626: Type mismatch in redeclaration of 'hb_parcx' Error E2356 F:\Harbour\Include\hbapi.h 686: Type mismatch in redeclaration of 'hb_retl' Warning W8065 MAUFUNC.PRG 3693: Call to function 'hb_retl' with no prototype in function HB_FUN_VERCAPSLOCK Warning W8065 MAUFUNC.PRG 3709: Call to function 'hb_retl' with no prototype in function HB_FUN_VERNUMLOCK Warning W8065 MAUFUNC.PRG 3725: Call to function 'hb_retl' with no prototype in function HB_FUN_VERSCROLLOCK Warning W8065 MAUFUNC.PRG 3741: Call to function 'hb_retl' with no prototype in function HB_FUN_VERINSERT Lamentablemente respecto a funcione de xH y H, estoy perdido. Una ayuda....
setenvironmentVariable() de xH a H
Solucionado solo agregue: define "hbapi.h"
seterrorfilename
Hi, If I Compile and run this program with last version of Fivewin I find error.log in current folder and not c:\marco.log what's wrong? Bye [code=fw:3uk6f4nj]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><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> cDbf := <span style="color: #ff0000;">"marco->codice"</span><br /><br />SetErrorFileName<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"c:<span style="color: #000000;">\m</span>arco.log"</span> <span style="color: #000000;">&#41;</span><br /><br />? &<span style="color: #000000;">&#40;</span>cDbf<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:3uk6f4nj]
seterrorfilename
Marco, there are two problems: 1. you have to specify the path separately using SetErrorPath() 2. there is an error in the function SetErrorFileName() This is the fixed sample: #include "fivewin.ch" FUNCTION MAIN()[code=fw:206b6m6k]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">LOCAL</span> cDbf := <span style="color: #ff0000;">"marco->codice"</span><br /><br />SetErrorPath<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"c:<span style="color: #000000;">\"</span> )<br />SetErrorFileName( "</span>marco.log<span style="color: #ff0000;">" )<br /><br />? &(cDbf)<br /><br />RETURN NIL<br /><br /><br />function SetErrorFileName( cFileName )<br />&nbsp; &nbsp;local cOldFileName<br />&nbsp; &nbsp;static cErrorFileName := "</span>error.log<span style="color: #ff0000;">"<br /><br />&nbsp; &nbsp;cOldFileName = cErrorFileName<br /><br />&nbsp; &nbsp;if PCount() == 1 .and. ValType( cFileName ) == "</span>C<span style="color: #ff0000;">"<br />&nbsp; &nbsp; &nbsp; cErrorFileName = cFileName<br />&nbsp; &nbsp;endif<br /><br />return cOldFileName</span></div>[/code:206b6m6k] EMG
seterrorfilename
Thank You Enrico
setfocus
Hola. Tengo un problema. Tengo una aplicacion y necesito que al abrir un dialog, segun un parametro (un campo logico en una tabla), el cursor quede en 2 textbox diferentes (si el campo es .t., que quede, por ej en el text box ID 102, y si es false en el ID 109; El 102, el 109 y el resto me tienen que quedar habilitados, pero el cursos en uno de los 2 (no puedo manejarlo con el numero de orden del resource manager).Pense en el setfocus, pero no me funciona. Pense en una instruccion on init (if(parametro=.t.,oget102:setfocus(),oget109:setfocus()), pero no funciona. Alguien tiene alguna idea, calculo que esto debe poder hacerse sin dramas, pero me falla; tengo la version de FIvewin para arbour de Marzo de 2008 (igualmente probe con otras 2 versiones anteriores, y ocurre lo mismo). Aclaro que en el ON INIT, ademas del IF que describo, tengo otras instrucciones que me habilitan / deshabilitan controles segun otros parametros. Espero que me puedan dar una mano. Gracias. Atte.
setfocus
Intente ahoram en el ON INIT usando XFOCUS( oObjeto ) [code:1bjuxaxk] //-------------------------------------------------------------------------// // As vezes simples SetFocus&#40; oObj &#41; nao faz um objeto ganhar foco // neste caso pode apelar para estas duas funcoes a seguir // For‡ar foco para um objeto especifico - Ednaldo Rolim&#46;&#46;&#46; //-------------------------------------------------------------------------// FUNCTION xSetFocus&#40; oObj &#41; LOCAL _oWnd &#58;= oObj&#58;oWnd, _oTempo &#58;= "" DEFINE Timer _oTempo Interval 10 of _oWnd ; Action &#40; oObj&#58;SetFocus&#40;&#41;, _oTempo&#58;End&#40;&#41; &#41; ACTIVATE Timer _oTempo RETURN&#40; &#46;T&#46; &#41; //-------------------------------------------------------------------------// FUNCTION xFocus&#40; oObj &#41; xSetFocus&#40; oObj &#41; xSetFocus&#40; oObj &#41; RETURN&#40; &#46;T&#46; &#41; [/code:1bjuxaxk]
setkey y ALT
Hola. Tengo la siguiente instruccion: SetKey( VK_F10, { || obt1:click() } ) para que al presionar la tecla F10, se realice la accion asociada al boton obt1. El sintoma es rarisimo: cuando hago esto, funciona perfecto, pero si presiono la tecla ALT, por ejemplo para activar un ALT+64 para la ñ, se ejecuta el obt1:clic(). ¿Tienen idea si existe alguna relacion entre ALT y F10, o que puede estar pasando? Gracias.
settare la lingua
si puo' fare inmodo che quando l'utente apre un applicazione i messaggi o l escritte per esempio i giorni della settimana, il mese del calendario sia scritto in italiano oppure se l'applicazione viene usata in america e l'utente ha il pc settato conla lingua inglese l'applicazione scrive in inglese ? quali comandi devo inserire e quale librerie nella compilazione ?
setting font on Group Box
I observed that in .rc has [1 24 "WindowsXP.Manifest" ] the font set in oFolder:SetFont( oFont ) is inherited by oGroup and direspecting oGroup:Setfont( oNewFont ) <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> sample .rc1 24 "WindowsXP.Manifest" INFOFLD DIALOG 1, 1, 200, 200STYLE WS_CHILDFONT 10, "Courier"{ CONTROL "", 103, "SysTabControl32", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 1, 1, 198, 198}INFODLG DIALOG 1, 1, 597, 468STYLE WS_CHILDFONT 10, "Courier"{ GROUPBOX "&Group", 130, 8, 10, 431, 74, BS_GROUPBOX | BS_LEFTTEXT | WS_GROUP}....sample .prg....DEFINE DIALOG oDlg RESOURCE "INFOFLD"....REDEFINE FOLDER oFolder ID 103 OF oDlg; PROMPT "INFO"; DIALOGS "INFODLG" oFolder:SetFont( oFont ) //big font for folder title REDEFINE GROUP; ID 130 OF oFolder:aDialogs[ 1 ]; FONT oDlgFont TRANSPARENT //just courier 10.....BUT..... the font of group box is font of oFolder!?? I even set it like this... REDEFINE GROUP oGroup; ID 130 OF oFolder:aDialogs[ 1 ]; FONT oDlgFont TRANSPARENT //just courier 10 oGroup:SetFont( oDlgFont ) // but still font of oFolder.... <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? --> <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? --> <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? --> <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? --> <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? -->but if i remove [ 1 24 "WindowsXP.Manifest" ] in .RC the groupbox is now controllable... font can be set accordingly.BUG? <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
setting font on Group Box
Frances,Here you have a working sample that is working fine here:test.prg[code:1fu5b8pt] #include "FiveWin&#46;ch" function Main&#40;&#41; local oDlg, oFont DEFINE FONT oFont NAME "Verdana" SIZE 0, -12 DEFINE DIALOG oDlg RESOURCE "test" REDEFINE GROUP oGrp ID 100 OF oDlg ACTIVATE DIALOG oDlg CENTERED ; ON INIT oGrp&#58;SetFont&#40; oFont &#41; oFont&#58;End&#40;&#41; return nil [/code:1fu5b8pt] test.rc [code:1fu5b8pt] 1 24 "WindowsXP&#46;Manifest" test DIALOG 17, 36, 120, 116 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Test" FONT 8, "MS Sans Serif" &#123; GROUPBOX "Group", 100, 9, 6, 103, 79, BS_GROUPBOX DEFPUSHBUTTON "OK", 1, 62, 93, 50, 14 &#125; [/code:1fu5b8pt][url=http&#58;//imageshack&#46;us:1fu5b8pt][img:1fu5b8pt]http&#58;//img511&#46;imageshack&#46;us/img511/711/francesfg5&#46;png[/img:1fu5b8pt][/url:1fu5b8pt]
setting font on Group Box
Thank you so much for your reply!It is very clear in your code that dialog and group object from .rc are working pretty well....But the issue is when you define folder with tab...or tabs... with define dialog and group object... that the font set to group is not possible ..? <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? --> ? but using the font of folder wherein defined as bigger than it's child dialog with group object... thus making the group looks funny.... with xp manifest in the rc...but without xp manifest, the group object's font is showing correctly.Please see the above code again.regards,
setting font on Group Box
Frances,Please try the call to oGroup:SetFont( oDlgFont ) from the ON INIT clause of your main dialog:ACTIVATE DIALOG oDlg ON INIT oGroup:SetFont( oDlgFont )
setting font on Group Box
Mr. Antonio,Unfortunately same thing happened. Groupboxes fonts cannot be set under dialog of folder:adialogs[1] with defined xp manifest in .RCMaybe really a bug in group class... ? <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? --> ?Regards,
setting font on Group Box
Frances,We have reviewing the Class TGroup and it does not seem as a bug inside it as it does not paint the text at all.It looks as a side effect of the use of themes and the use of a folder.We keep doing tests to see if we can find a workaround for it.
setting font on Group Box
Thank you so much for the immediate attention <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Looking forward for the workaround...Regards,
setting font on Group Box
Mr. Antonio,The effect of themes + folder font + group box font is really an issue for me.I cant find any solution with app on themed with folder font and groupbox font mix together...oGroup:oFont.. is 'courier 10' but the display (under xp theme) oFolder's font ... 'times 22'This is not only confusing.. <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> Regards,
setting font on Group Box
Antonio Have you found a solution about this problem ? Grazie MAurizio
setting font on Group Box
This is still an issue with FWH 8.11If the groupbox has caption...[img:3ce61qx5]http&#58;//i208&#46;photobucket&#46;com/albums/bb82/fraxzi/FWxHarbour/folderfont&#46;jpg[/img:3ce61qx5]a painful workaround is to define SAY object and put on top of groupbox (without caption) <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: --> <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: --> <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: --> <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: --> any solution yet?Regards
setting font on Group Box
Frances,Each page of a folder contains a dialog that may be getting its font from its container (the folder), and the groupbox may be using the same font by default.Have you tried to change the groupbox font ? oGroup:SetFont( oFont )
setting font on Group Box
Yes. I assigned diff font to groupbox, say and get objects with expected results. Only that icon of folder affects the groupboxes (themed)..I tried oGroup:SetFont( oFont ) on dialog init and other workarounds but to no avail.this mystery does not exist on NON-THEMED apps... It should be solved by FWH8.11 <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P --> <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P --> <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P --> <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P --> Please help for this is not convenient programming...Regards
setting font on Group Box
Lets build a small example to reproduce it...
setting font on Group Box
[code:1uog1zaj] #include "FiveWin&#46;ch" function Main&#40;&#41; local oDlg, oFld, oGrp DEFINE DIALOG oDlg SIZE 400, 300 @ 0&#46;5, 1 FOLDER oFld OF oDlg SIZE 188, 138 ; PROMPTS "One", "Two", "Three" @ 1, 1 GROUP oGrp TO 5, 15 PROMPT "Test" OF oFld&#58;aDialogs&#91; 1 &#93; ACTIVATE DIALOG oDlg CENTERED return nil [/code:1uog1zaj]
setting font on Group Box
Setting a font. Is this what you mean ? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->[code:3d0q0ixs] #include "FiveWin&#46;ch" function Main&#40;&#41; local oFnt, oDlg, oFld, oGrp DEFINE FONT oFnt NAME "Verdana" SIZE 0, -16 BOLD DEFINE DIALOG oDlg SIZE 400, 300 FONT oFnt @ 0&#46;5, 1 FOLDER oFld OF oDlg SIZE 188, 138 ; PROMPTS "One", "Two", "Three" @ 1, 1 GROUP oGrp TO 5, 15 PROMPT "Test" OF oFld&#58;aDialogs&#91; 1 &#93; ACTIVATE DIALOG oDlg CENTERED return nil [/code:3d0q0ixs]
setting font on Group Box
This is working fine:[code:23fyghpz] #include "FiveWin&#46;ch" function Main&#40;&#41; local oFnt, oFnt2, oDlg, oFld, oGrp DEFINE FONT oFnt NAME "Verdana" SIZE 0, -16 BOLD DEFINE FONT oFnt2 NAME "Arial" SIZE 0, -10 DEFINE DIALOG oDlg SIZE 400, 300 FONT oFnt @ 0&#46;5, 1 FOLDER oFld OF oDlg SIZE 188, 138 ; PROMPTS "One", "Two", "Three" @ 1, 1 GROUP oGrp TO 5, 15 PROMPT "Test" OF oFld&#58;aDialogs&#91; 1 &#93; ACTIVATE DIALOG oDlg CENTERED ; ON INIT oGrp&#58;SetFont&#40; oFnt2 &#41; return nil [/code:23fyghpz]Should I add themes manifest to it ?
setting font on Group Box
OK! Lets try and solve this..I will build this example and post results..ASAP.The dialog should be redefined from .RC and themed.
setting font on Group Box
Ok, using themes we can reproduce the problem.First change required is this line in Class TControl:[code:8tj8y7yy] METHOD Colors&#40; hDC &#41; CLASS TControl &#46;&#46;&#46; else if IsAppThemed&#40;&#41; &#46;and&#46; Upper&#40; &#58;&#58;ClassName&#40;&#41; &#41; $ "TCHECKBOX;TRADIO;TGROUP" // changed! DrawPBack&#40; &#58;&#58;hWnd, hDC &#41; endif endif &#46;&#46;&#46; [/code:8tj8y7yy]
setting font on Group Box
[code:2o5n2x3k] #include "FiveWin&#46;ch" function Main&#40;&#41; local oFnt, oDlg, oFld, oGrp local oFnt2 DEFINE FONT oFnt NAME "Verdana" SIZE 0, -16 BOLD DEFINE FONT oFnt2 NAME "Verdana" SIZE 0, -12 DEFINE DIALOG oDlg SIZE 400, 300 FONT oFnt @ 0&#46;5, 1 FOLDER oFld OF oDlg SIZE 188, 138 ; PROMPTS "One", "Two", "Three" @ 1, 1 GROUP oGrp TO 5, 15 PROMPT "Test" OF oFld&#58;aDialogs&#91; 1 &#93; ACTIVATE DIALOG oDlg CENTERED; ON INIT oGrp&#58;SetFont&#40; oFnt2 &#41; return nil [/code:2o5n2x3k]This is true and correct:[img:2o5n2x3k]http&#58;//i208&#46;photobucket&#46;com/albums/bb82/fraxzi/FWxHarbour/try_groupbox&#46;jpg[/img:2o5n2x3k]
setting font on Group Box
Frances,Are you using themes there ?It does not work fine in Vista when using themes <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> It looks like a Windows bug with groups and themes. We need to find a workaround for this...
setting font on Group Box
Yes.Here's the sample codes ([b:2lcma36h]EXPANDED[/b:2lcma36h]).PRG[code:2lcma36h] #include "FiveWin&#46;ch" function Main&#40;&#41; local oFnt, oDlg, oFld, oGrp local oFnt2 DEFINE FONT oFnt NAME "Verdana" SIZE 0, -16 BOLD DEFINE FONT oFnt2 NAME "Verdana" SIZE 0, -12 DEFINE DIALOG oDlg FONT oFnt RESOURCE 'TRY_DLG' REDEFINE FOLDER oFld ID 903 OF oDlg; PROMPTS "One", "Two", "Three"; DIALOGS 'GRP_DLG','BLANK_DLG','BLANK_DLG'; FONT oFnt ACTIVATE DIALOG oDlg CENTERED; ON INIT oFld&#58;aDialogs&#91;1&#93;&#58;SetFont&#40; oFnt2 &#41; return nil [/code:2lcma36h] .RC [code:2lcma36h] 1 MANIFEST "xpman&#46;xml" TRY_DLG DIALOG 1, 1, 160, 111 STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU &#123; CONTROL "", 903, "SysTabControl32", 0 | WS_CHILD | WS_VISIBLE, 5, 7, 149, 100 &#125; GRP_DLG DIALOG 1, 1, 99, 51 STYLE WS_CHILD | WS_CLIPCHILDREN &#123; GROUPBOX "Group", 101, 6, 7, 85, 34, BS_GROUPBOX &#125; BLANK_DLG DIALOG 1, 1, 95, 61 STYLE WS_CHILD | WS_SYSMENU &#123; &#125; [/code:2lcma36h]RESULTS[img:2lcma36h]http&#58;//i208&#46;photobucket&#46;com/albums/bb82/fraxzi/FWxHarbour/try_groupbox2&#46;jpg[/img:2lcma36h]That's the problem there. The groupbox should be of different font against the font of TFolder.I hope we can make some workaround.. Vista is not my concern.. Only XP.Best regards, <!-- s:twisted: --><img src="{SMILIES_PATH}/icon_twisted.gif" alt=":twisted:" title="Twisted Evil" /><!-- s:twisted: -->
setting font on Group Box
Frances,I have tried to set the hroupbox font from Class TControl Method Colors() but without success...Colors() is called just before painting the control, and even there a WM_SETFONT msg is not properly processed. Strange...
setting font on Group Box
This fails too:[code:1gd52j5d] #include "FiveWin&#46;ch" function Main&#40;&#41; local oFnt, oFnt2, oDlg, oFld, oGrp DEFINE FONT oFnt NAME "Verdana" SIZE 0, -16 BOLD DEFINE FONT oFnt2 NAME "Arial" SIZE 0, -10 DEFINE DIALOG oDlg SIZE 400, 300 FONT oFnt @ 0&#46;5, 1 FOLDER oFld OF oDlg SIZE 188, 138 ; PROMPTS "One", "Two", "Three" @ 1, 1 GROUP oGrp TO 5, 15 PROMPT "Test" OF oFld&#58;aDialogs&#91; 1 &#93; FONT oFnt2 @ 5, 1 BUTTON "font" OF oFld&#58;aDialogs&#91; 1 &#93; ACTION oGrp&#58;SelFont&#40;&#41; ACTIVATE DIALOG oDlg CENTERED return nil [/code:1gd52j5d]
setting font on Group Box
[quote="Antonio Linares":3ol5womv]This fails too: [code:3ol5womv] #include "FiveWin&#46;ch" function Main&#40;&#41; local oFnt, oFnt2, oDlg, oFld, oGrp DEFINE FONT oFnt NAME "Verdana" SIZE 0, -16 BOLD DEFINE FONT oFnt2 NAME "Arial" SIZE 0, -10 DEFINE DIALOG oDlg SIZE 400, 300 FONT oFnt @ 0&#46;5, 1 FOLDER oFld OF oDlg SIZE 188, 138 ; PROMPTS "One", "Two", "Three" @ 1, 1 GROUP oGrp TO 5, 15 PROMPT "Test" OF oFld&#58;aDialogs&#91; 1 &#93; FONT oFnt2 @ 5, 1 BUTTON "font" OF oFld&#58;aDialogs&#91; 1 &#93; ACTION oGrp&#58;SelFont&#40;&#41; ACTIVATE DIALOG oDlg CENTERED return nil [/code:3ol5womv][/quote:3ol5womv][b:3ol5womv]This works good.. same as the first example.[/b:3ol5womv] Please try the ([b:3ol5womv]EXPANDED[/b:3ol5womv]) sample.
setting font on Group Box
Mr. Antonio,Any development?Regards
setting font on Group Box
Frances,No, sorry, nothing yet. It seems as a Windows theme bug and we need to find a workaround.Setting the right font from Method Colors() should be enough, but it does not work.
setting font on Group Box
[b:oq3kxj0l]SOLVED!!!! - workaround[/b:oq3kxj0l]Mr. Antonio,I put this:[code:oq3kxj0l] &#46;&#46;&#46; ON INIT oFld&#58;aDialogs&#91;2&#93;&#58;bEraseBkGnd &#58;= &#123; | hDC | DrawPBack&#40; oFld&#58;hWnd, hDC &#41;, 1 &#125; &#46;&#46;&#46; [/code:oq3kxj0l] OR [code:oq3kxj0l] &#46;&#46;&#46; ON INIT oFld&#58;aDialogs&#91;2&#93;&#58;bEraseBkGnd &#58;= Nil &#46;&#46;&#46; [/code:oq3kxj0l] oFld:aDialogs[2] is the container of redefined dialog with redefined groupbox oFld:hWnd is the handle of redefined folder Please look at the image [img:oq3kxj0l]http&#58;//i208&#46;photobucket&#46;com/albums/bb82/fraxzi/FWxHarbour/groupbox-SOLVED&#46;jpg[/img:oq3kxj0l] [b:oq3kxj0l]This bug must be solved in the future[/b:oq3kxj0l] [b:oq3kxj0l]Observation:[/b:oq3kxj0l] [u:oq3kxj0l]Noticed the folder color!? it turns to plain and not themed.... <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->[/u:oq3kxj0l] I added this: [code:oq3kxj0l] &#46;&#46;&#46; REDEFINE FOLDER oFld &#46;&#46;&#46; COLOR CLR_BLACK, RGB&#40;252,252,254&#41; &#46;&#46;&#46; [/code:oq3kxj0l]Result:[img:oq3kxj0l]http&#58;//i208&#46;photobucket&#46;com/albums/bb82/fraxzi/FWxHarbour/groupbox-SOLVED2&#46;jpg[/img:oq3kxj0l]
setup
I use ezsetup to install the program. It works fine. Buti in the shortcut the icon does not appear. In the install.ini I write [CEAppManager] Version = 1.0 Component = K1 [K1] Description = Mio programma IconFile = logo.ico IconIndex = 0 DeviceFile = k1.exe Cabfiles = install.PPC2003_ARM.CAB Any idea? Regards Pier Luigi
setup
and if You use INNO SETUP ?
setup
I have found the error. The name of the icon must be equal to the name of the program. For example: Test.exe/Test.ico. EZSETUP works very well. Regards. Pier Luigi
setup rf scanners
We want to modify some of our Powerbuilder applications to run on RF scanners. we're on PB10.2 and looking into adding Symbol MC9090 mobile computers with barcode scanners to our system. Can the rf units connect to the server using ftp and run our modified powerbuilder applications (designed for smaller screens)? I want to make them go straight into the login screen when they are turned on and power off when exiting powerbuilder.
setup rf scanners
???
several get's in a loop
Hello Antonio, I use the CreatBlock function for some FOR-Next loops to build screens. Now I want to use it to get the value of several get properties in a loop. However I don't get this to work. Any suggestions? Here is what I use now: [code=fw:1e2y4o1g]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">PUBLIC</span> aGegevenTekst<span style="color: #000000;">&#91;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><br /><br />AADD<span style="color: #000000;">&#40;</span>aGegevenTekst, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'bloemkleur'</span>, <span style="color: #ff0000;">''</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aGegevenTekst, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'kleur kelk'</span>, <span style="color: #ff0000;">''</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aGegevenTekst, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'kleur kroon'</span>, <span style="color: #ff0000;">''</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aGegevenTekst, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'bloeivorm'</span>, <span style="color: #ff0000;">''</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aGegevenTekst, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'bloeitijd'</span>, <span style="color: #ff0000;">''</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aGegevenTekst, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'hoogte'</span>, <span style="color: #ff0000;">''</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aGegevenTekst, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'hoogte na 10 jr'</span>, <span style="color: #ff0000;">''</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aGegevenTekst, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'hoogte na 25 jr'</span>, <span style="color: #ff0000;">''</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aGegevenTekst, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'hoogte blad'</span>, <span style="color: #ff0000;">''</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aGegevenTekst, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'hoogte bloem'</span>, <span style="color: #ff0000;">''</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aGegevenTekst, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'breedte'</span>, <span style="color: #ff0000;">''</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aGegevenTekst, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'groeiwijze'</span>, <span style="color: #ff0000;">''</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aGegevenTekst, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'blad/loof'</span>, <span style="color: #ff0000;">''</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; &nbsp; nRowPaint := <span style="color: #000000;">325</span><br />&nbsp; &nbsp; nColumn := <span style="color: #000000;">0</span><br />&nbsp; &nbsp; <span style="color: #00C800;">FOR</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">13</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oGetName := <span style="color: #ff0000;">'oGetFilter'</span> + ALLTRIM<span style="color: #000000;">&#40;</span>STR<span style="color: #000000;">&#40;</span>n<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cGetVar := aGegevenTekst<span style="color: #000000;">&#91;</span>n,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; @ nRowPaint, nColumn <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> aGegevenTekst<span style="color: #000000;">&#91;</span>n,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oSay:<span style="color: #000000;">SetAlign</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; @ nRowPaint, nColumn<span style="color: #000000;">+105</span> <span style="color: #0000ff;">GET</span> &oGetName <span style="color: #0000ff;">VAR</span> cGetVar <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>, <span style="color: #000000;">20</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &oGetName:<span style="color: #000000;">bChanged</span> := CreateBlock<span style="color: #000000;">&#40;</span> oGetName <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; nRowPaint := nRowPaint - <span style="color: #000000;">25</span><br />&nbsp; &nbsp; <span style="color: #00C800;">NEXT</span><br /><br /><br />*************************************************<br /><br /><span style="color: #00C800;">FUNCTION</span> CreateBlock<span style="color: #000000;">&#40;</span> cName <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #000000;">&#123;</span> || RK_ChangeGegevenSelect<span style="color: #000000;">&#40;</span> cName <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><br />*************************************************<br /><br /><span style="color: #00C800;">FUNCTION</span> RK_ChangeGegevenSelect<span style="color: #000000;">&#40;</span>cName<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">LOCAL</span> nGegeven := VAL<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span>cName, <span style="color: #000000;">11</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span>cName<span style="color: #000000;">&#41;</span><br />aGegevenTekst<span style="color: #000000;">&#91;</span>nGegeven,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> := cName:<span style="color: #000000;">GetText</span><br /><br /><span style="color: #00C800;">RETURN</span><br /><br />&nbsp;</div>[/code:1e2y4o1g] Greetings, René
several get's in a loop
René, AEval( oDlg:aControls, { | oControl | If( Upper( oControl:ClassName() ) == "TGET", save oControl:GetText(), nil ) } )
several get's in a loop
Hello Antonio, As I understand all defined classes are in an array. But how looks this array, is there an example anywhere? If I ask: [quote:2aqmlvi9]oFld:aDialogs[2]:aControls[n]:ClassName()[/quote:2aqmlvi9], I get all classnames, but how to retrieve the name of the class (Like oGet1, oGet2...) Rene
several get's in a loop
René, > I get all classnames, but how to retrieve the name of the class (Like oGet1, oGet2...) If you mean the name of the object: oControl:cVarName if you mean its class name: oControl:ClassName()
several minor bugs FWH 13.07
Hello, I have discovered several bugs: report.prg: in method actívate, the dialog does not show the page number, I see the dialog with title and Cancel button, nothing else. To see it, you need a large dbf. rpreview.prg: when you click on Factor combobox, nothing is changed. Also, cTitles for Msg*** functions are not translated, prv2pdf.prg: DEFAULT lOpen := MsgYesNo( FWString( "View" ) + ' ' + cPDF + " (Y/N)?" ) (Y/N) should also be translated, and removed last ? as in Spanish, French or Italian woudl be [b:34yhu5yi]¿[/b:34yhu5yi]...?. And when the report is a Little big, a GPF with hb_out.log happens: [code=fw:34yhu5yi]<div class="fw" id="{CB}" style="font-family: monospace;">Error irrecuperable <span style="color: #000000;">9006</span>: <span style="color: #000000;">hb_xgrab</span> no puede asignar memoria<br />Called <span style="color: #0000ff;">from</span> DIBTOSTR<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />Called <span style="color: #0000ff;">from</span> EMF2JPEG<span style="color: #000000;">&#40;</span><span style="color: #000000;">74</span><span style="color: #000000;">&#41;</span> in .\source\<span style="color: #00C800;">function</span>\PRV2PDF.PRG<br />Called <span style="color: #0000ff;">from</span> FWPDF:<span style="color: #000000;">ADDMETA</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">139</span><span style="color: #000000;">&#41;</span> in .\source\<span style="color: #00C800;">function</span>\PRV2PDF.PRG<br />Called <span style="color: #0000ff;">from</span> <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>FWSAVEPREVIEWTOPDF<span style="color: #000000;">&#40;</span><span style="color: #000000;">38</span><span style="color: #000000;">&#41;</span> in .\source\<span style="color: #00C800;">function</span>\PRV2PDF.PRG<br />Called <span style="color: #0000ff;">from</span> AEVAL<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />Called <span style="color: #0000ff;">from</span> FWSAVEPREVIEWTOPDF<span style="color: #000000;">&#40;</span><span style="color: #000000;">38</span><span style="color: #000000;">&#41;</span> in .\source\<span style="color: #00C800;">function</span>\PRV2PDF.PRG<br />Called <span style="color: #0000ff;">from</span> TPREVIEW:<span style="color: #000000;">SAVEAS</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1656</span><span style="color: #000000;">&#41;</span> in .\source\classes\RPREVIEW.PRG<br />Called <span style="color: #0000ff;">from</span> <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>TPREVIEW_SAVEASMENU<span style="color: #000000;">&#40;</span><span style="color: #000000;">1617</span><span style="color: #000000;">&#41;</span> in .\source\classes\RPREVIEW.PRG<br />Called <span style="color: #0000ff;">from</span> TMENU:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">496</span><span style="color: #000000;">&#41;</span> in .\source\classes\<span style="color: #0000ff;">MENU</span>.PRG<br />Called <span style="color: #0000ff;">from</span> TBTNBMP:<span style="color: #000000;">SHOWPOPUP</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1494</span><span style="color: #000000;">&#41;</span> in .\source\classes\<span style="color: #0000ff;">BTNBMP</span>.PRG<br />Called <span style="color: #0000ff;">from</span> <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>TPREVIEW_BUILDBUTTONBAR<span style="color: #000000;">&#40;</span><span style="color: #000000;">334</span><span style="color: #000000;">&#41;</span> in .\source\classes\RPREVIEW.PRG<br />Called <span style="color: #0000ff;">from</span> TBTNBMP:<span style="color: #0000ff;">CLICK</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">471</span><span style="color: #000000;">&#41;</span> in .\source\classes\<span style="color: #0000ff;">BTNBMP</span>.PRG<br />Called <span style="color: #0000ff;">from</span> TBTNBMP:<span style="color: #000000;">LBUTTONUP</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">659</span><span style="color: #000000;">&#41;</span> in .\source\classes\<span style="color: #0000ff;">BTNBMP</span>.PRG<br />Called <span style="color: #0000ff;">from</span> TCONTROL:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1719</span><span style="color: #000000;">&#41;</span> in .\source\classes\CONTROL.PRG<br />Called <span style="color: #0000ff;">from</span> TBTNBMP:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1465</span><span style="color: #000000;">&#41;</span> in .\source\classes\<span style="color: #0000ff;">BTNBMP</span>.PRG<br />Called <span style="color: #0000ff;">from</span> _FWH<span style="color: #000000;">&#40;</span><span style="color: #000000;">3183</span><span style="color: #000000;">&#41;</span> in .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG<br />Called <span style="color: #0000ff;">from</span> SYSREFRESH<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />Called <span style="color: #0000ff;">from</span> STOPUNTIL<span style="color: #000000;">&#40;</span><span style="color: #000000;">60</span><span style="color: #000000;">&#41;</span> in .\source\<span style="color: #00C800;">function</span>\MSGRUN.PRG<br />Called <span style="color: #0000ff;">from</span> TPREVIEW:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">143</span><span style="color: #000000;">&#41;</span> in .\source\classes\RPREVIEW.PRG<br />Called <span style="color: #0000ff;">from</span> RPREVIEW<span style="color: #000000;">&#40;</span><span style="color: #000000;">1755</span><span style="color: #000000;">&#41;</span> in .\source\classes\RPREVIEW.PRG<br />Called <span style="color: #0000ff;">from</span> <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>TREPORT_NEW<span style="color: #000000;">&#40;</span><span style="color: #000000;">173</span><span style="color: #000000;">&#41;</span> in .\source\report.prg<br />Called <span style="color: #0000ff;">from</span> TREPORT:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">851</span><span style="color: #000000;">&#41;</span> in .\source\report.prg<br /> </div>[/code:34yhu5yi] Thank you. Best regards
several minor bugs FWH 13.07
Up. Thanks.
several minor bugs FWH 13.07
Lucas, We have seen your post and we are working to fix them, thanks They are minor bugs, as a bug is an error that blocks an application so it can't be used.
several minor bugs FWH 13.07
Lucas, 1. In source\classes\report.prg replace: @ 200, 250 SAY oPagina VAR ::nPage OF ::oRptWnd PIXEL with this: @ 35, 90 SAY oPagina VAR ::nPage OF ::oRptWnd PIXEL SIZE 80, 12
several minor bugs FWH 13.07
Master Antonio, Please, do not mistreat such errors. Users see that failures in the application and they think the aplication it´s not safe and secure. Very very important. Best wishes,
several minor bugs FWH 13.07
2. The combobox factor is not intendeed to do "anything" except to set the zoom factor for next zoom. In case that we want to have certain functionality, this could help: [code=fw:1y4t4gua]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; @ nRow - <span style="color: #000000;">4</span>, nCol + <span style="color: #000000;">40</span> <span style="color: #0000ff;">COMBOBOX</span> ::<span style="color: #000000;">oFactor</span> <span style="color: #0000ff;">VAR</span> ::<span style="color: #000000;">nZFactor</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ITEMS</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"1"</span>, <span style="color: #ff0000;">"2"</span>, <span style="color: #ff0000;">"3"</span>, <span style="color: #ff0000;">"4"</span>, <span style="color: #ff0000;">"5"</span>, <span style="color: #ff0000;">"6"</span>, <span style="color: #ff0000;">"7"</span>, <span style="color: #ff0000;">"8"</span>, <span style="color: #ff0000;">"9"</span> <span style="color: #000000;">&#125;</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">OF</span> ::<span style="color: #000000;">oBar</span> <span style="color: #0000ff;">FONT</span> ::<span style="color: #000000;">oFont</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">35</span>,<span style="color: #000000;">200</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">&#40;</span> oThis:<span style="color: #000000;">SetFactor</span><span style="color: #000000;">&#40;</span> oThis:<span style="color: #000000;">nZFactor</span> <span style="color: #000000;">&#41;</span>, oThis:<span style="color: #000000;">SetOrg1</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:1y4t4gua] But the problem is that we can not switch from a zoom factor to another zoom factor. I appreciate your (all) comments, thanks
several minor bugs FWH 13.07
3. done, thanks
several minor bugs FWH 13.07
4. done, thanks
several minor bugs FWH 13.07
Antonio, in 1), report, METHOD Activate In the dialog is also missing the string "Preparando página: " Thanks.
several minor bugs FWH 13.07
Antonio, Lo del Factor del rpreview.prg nos lo arreglaste así en el método Setfactor de rpreview.prg ::oMeta1:SetZoomFactor( ::nZFactor, ::nZFactor * 2 ) [b:29deffl6] if !::lZoom .and. ! lInit ::Zoom( .T. ) // A.L. 08 Oct 2007 endif[/b:29deffl6] if ::lZoom ::oWnd:oVScroll:SetRange( 1, VSCROLL_RANGE ) if ::nZFactor > 1 ::oWnd:oHScroll:SetRange( 1, HSCROLL_RANGE ) else Con ese código, si pinchas en el combobox o en el menú y cambias el Factor sí que funciona.
several minor bugs FWH 13.07
Elvira, gracias! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
several questions about GET class
I have a few questions about the GET class. How do I set the numeric format Can I detect if the ENTER key is pressed in a GET, so I can perform an action on this How do I detect a change of GET, like every key-stroke and perform an action. I have a window with several GETs but don't get the desired result [code=fw:g4cqyub7]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00D7D7;">#DEFINE</span> m1 CHR<span style="color: #000000;">&#40;</span><span style="color: #000000;">109</span><span style="color: #000000;">&#41;</span> + CHR<span style="color: #000000;">&#40;</span><span style="color: #000000;">0185</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00D7D7;">#DEFINE</span> m2 CHR<span style="color: #000000;">&#40;</span><span style="color: #000000;">109</span><span style="color: #000000;">&#41;</span> + CHR<span style="color: #000000;">&#40;</span><span style="color: #000000;">0178</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">FUNCTION</span> RK_InputPlantMaat<span style="color: #000000;">&#40;</span>aMaat<span style="color: #000000;">&#41;</span><br /><br />*<span style="color: #0000ff;">to</span> <span style="color: #0000ff;">change</span> plantsizes<br />*date: <span style="color: #000000;">20</span><span style="color: #000000;">-06</span><span style="color: #000000;">-2018</span><br /><br /><span style="color: #00C800;">LOCAL</span> oDlg, oGet1, oGet2, oGet3, oGet4, oCbxPer, oBtnOk<br /><span style="color: #00C800;">LOCAL</span> nKey := <span style="color: #000000;">13</span><br /><span style="color: #00C800;">LOCAL</span> aAantalPer<span style="color: #000000;">&#91;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#93;</span><br />AADD<span style="color: #000000;">&#40;</span>aAantalPer, m1<span style="color: #000000;">&#41;</span><br />AADD<span style="color: #000000;">&#40;</span>aAantalPer, m2<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">/*aMaat contains the next values:<br />aMaat[1] > text<br />aMaat[2] > numeric "23.45"<br />aMaat[3] > text<br />aMaat[4] > numeric "123"<br />aMaat[5] > numeric "1"<br />*/</span><br />    <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">'Plantsizes'</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">500</span>, <span style="color: #000000;">210</span><br />   <br />    @ <span style="color: #000000;">140</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">'maat:'</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span><br />        oSay:<span style="color: #000000;">SetAlign</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />    @ <span style="color: #000000;">110</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">'prijs:'</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span><br />        oSay:<span style="color: #000000;">SetAlign</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span><br />    @  <span style="color: #000000;">80</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">'opmerking:'</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span><br />        oSay:<span style="color: #000000;">SetAlign</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />    @  <span style="color: #000000;">50</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">'plantafstand:'</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">20</span><br />        oSay:<span style="color: #000000;">SetAlign</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />    @  <span style="color: #000000;">50</span>, <span style="color: #000000;">225</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">'per:'</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">25</span>, <span style="color: #000000;">20</span><br />        oSay:<span style="color: #000000;">SetAlign</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />   <br />    @ <span style="color: #000000;">140</span>, <span style="color: #000000;">115</span> <span style="color: #0000ff;">GET</span> oGet1 <span style="color: #0000ff;">VAR</span> aMaat<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oDlg TOOLTIP <span style="color: #ff0000;">"tik hier in"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>, <span style="color: #000000;">25</span><br />        oGet1:<span style="color: #000000;">KeyDown</span><span style="color: #000000;">&#40;</span> nKey <span style="color: #000000;">&#41;</span>             && how can I make this work, what does it <span style="color: #00C800;">do</span>?<br />    @ <span style="color: #000000;">110</span>, <span style="color: #000000;">115</span> <span style="color: #0000ff;">GET</span> oGet2 <span style="color: #0000ff;">VAR</span> aMaat<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oDlg TOOLTIP <span style="color: #ff0000;">"tik hier in"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">25</span><br />        oGet2:<span style="color: #000000;">SetNumeric</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />        oGet2:<span style="color: #000000;">SetNumFormat</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">9999.99</span><span style="color: #000000;">&#41;</span>    &&this does not work correct, <span style="color: #00C800;">if</span> I enter something and then a dot everything disappears<br />    @  <span style="color: #000000;">80</span>, <span style="color: #000000;">115</span> <span style="color: #0000ff;">GET</span> oGet3 <span style="color: #0000ff;">VAR</span> aMaat<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oDlg TOOLTIP <span style="color: #ff0000;">"tik hier in"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">380</span>, <span style="color: #000000;">25</span><br />    @  <span style="color: #000000;">50</span>, <span style="color: #000000;">115</span> <span style="color: #0000ff;">GET</span> oGet4 <span style="color: #0000ff;">VAR</span> aMaat<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oDlg TOOLTIP <span style="color: #ff0000;">"tik hier in"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">25</span><br />        oGet4:<span style="color: #000000;">SetNumeric</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />        oGet4:<span style="color: #000000;">SetNumFormat</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"0"</span><span style="color: #000000;">&#41;</span><br />    @ <span style="color: #000000;">50</span>, <span style="color: #000000;">255</span> <span style="color: #0000ff;">COMBOBOX</span> oCbxPer <span style="color: #0000ff;">VAR</span> aMaat<span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">25</span> <span style="color: #0000ff;">ITEMS</span> aAantalPer<br />        <span style="color: #00C800;">IF</span> aMaat<span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span> > <span style="color: #000000;">0</span><br />            oCbxPer:<span style="color: #0000ff;">SELECT</span><span style="color: #000000;">&#40;</span>aMaat<span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ENDIF</span><br /><br />    @ <span style="color: #000000;">10</span>, <span style="color: #000000;">150</span> <span style="color: #0000ff;">BUTTON</span> oBtnOk <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Ok"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>aMaat<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> := oGet1:<span style="color: #000000;">GetText</span>, aMaat<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> := oGet2:<span style="color: #000000;">GetText</span>,aMaat<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> := oGet3:<span style="color: #000000;">GetText</span>, aMaat<span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span> := oGet4:<span style="color: #000000;">GetText</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 />    oBtnOk:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>      &&I don<span style="color: #ff0000;">'t get a focus on this button, How can I make this button allways focussed?<br />   <br />   ACTIVATE DIALOG oDlg CENTERED<br /><br />RETURN aMaat<br /></span></div>[/code:g4cqyub7]
several questions about GET class
The get problem is large to solve , the initial code used the style let's say "textbox". oGet2:SetNumFormat("###0.##") Then he has tried to use the GEt style with pictures, but correct operation has not been achieved .. this code @ 110, 115 GET oGet2 VAR aMaat[2] OF oDlg TOOLTIP "tik hier in" SIZE 100, 25 oGet2:SetNumFormat("###0.##") change to @ 15, 90 GET oget2 VAr aMaat[2] PICTURE "9999.99" OF oDlg TOOLTIP "a number" SIZE 100, 25 Now neither one nor the other works. <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> A ver si conseguimos que funcione ... //----------------- oGet1:KeyDown( nKey ) && how can I make this work, what does it do? is not correcto to load keydown method .... use this : oget1:bKeyDown := { |nkey| if ( nkey == asc( "A"), msginfo( "A"), ) } keydown method eval( bkeydown ) for nkey value ...
several questions about GET class
Hello Manuel, Thanks for the information. I hope you can solve this. Maybe we/you can create a diffent GET class for numeric input like GETNUM? I think it is importent to have a class that accepts numeric input. The bKeydown METHOD works perfect. I looked into SOURCES and found METHOD KeyDown, but not bKeydown. How do I know when to use what name of the METHOD, because SetNumeric() is used as this and not with a 'b' in front. There are a lot more METHODS in the GET class. Where can I find information on how to use them? Isa there more usable info in the FiveWin documentation?
several questions about GET class
Hello Manuel, I have made a little sample for a workaround with Numeric Gets. It is not so beautiful, but effective at this moment. See code: [code=fw:3ipym6ej]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveMac.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oDlg, oGet1<br />   <span style="color: #00C800;">local</span> cText1 := <span style="color: #ff0000;">""</span><br />      <br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"TestGetNum"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">400</span>, <span style="color: #000000;">100</span> FLIPPED<br />   <br />   @ <span style="color: #000000;">40</span>, <span style="color: #000000;">30</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Number:"</span> <span style="color: #0000ff;">OF</span> oDlg<br />   <br />   @ <span style="color: #000000;">40</span>, <span style="color: #000000;">90</span> <span style="color: #0000ff;">GET</span> oGet1 <span style="color: #0000ff;">VAR</span> cText1 <span style="color: #0000ff;">OF</span> oDlg TOOLTIP <span style="color: #ff0000;">"only numbers"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">250</span>, <span style="color: #000000;">25</span><br />        oGet1:<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> nkey >= <span style="color: #0000ff;">ASC</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"0"</span><span style="color: #000000;">&#41;</span> .AND. nKey <= <span style="color: #0000ff;">ASC</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"9"</span><span style="color: #000000;">&#41;</span> .OR. nKey == <span style="color: #0000ff;">ASC</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"."</span><span style="color: #000000;">&#41;</span>, ,<span style="color: #000000;">&#40;</span> cText1 := oGet1:<span style="color: #000000;">GetText</span>, cText1 := oGet1:<span style="color: #000000;">GetDelSel</span><span style="color: #000000;">&#40;</span>LEN<span style="color: #000000;">&#40;</span>cText1<span style="color: #000000;">&#41;</span>,LEN<span style="color: #000000;">&#40;</span>cText1<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />   @ <span style="color: #000000;">10</span>, <span style="color: #000000;">150</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Ok"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> cText1 <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:3ipym6ej] Now the GET only accepts numeric input and a dot as devider. I hope this is helpfull
several questions about GET class
Ok. Is a good solutión. I will try to implement it in the keydown of the class and that acts if the get is of numeric type. I'll tell you something when I have it so they can do tests.
several questions about GET class
ok. I have tried, but is not good solution ... If the character inserted in the middle of " numeric string" It does not work as it should. It does not work with pulsations of keys like enter , down arrow, up arrow, etc. I'm going to try to change how the pre-validation is done to see if we fix it a bit.. regards
several questions about GET class
Hello Manuel, I have done some more testing, and with a function I think we can make this work. For now I will post the function for as far as I am, but I think I can make the function more functional with SetPos and GetPos Methods. I will work on this tomorrow and let you know the result. [code=fw:111kq06u]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveMac.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<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cText1 := <span style="color: #ff0000;">""</span><br />&nbsp; &nbsp;<span style="color: #00C800;">public</span> oGet1<br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"TestGetNum"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">400</span>, <span style="color: #000000;">100</span> FLIPPED<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <span style="color: #000000;">40</span>, <span style="color: #000000;">30</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Text1:"</span> <span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <span style="color: #000000;">40</span>, <span style="color: #000000;">90</span> <span style="color: #0000ff;">GET</span> oGet1 <span style="color: #0000ff;">VAR</span> cText1 <span style="color: #0000ff;">OF</span> oDlg TOOLTIP <span style="color: #ff0000;">"a string with cross"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">250</span>, <span style="color: #000000;">25</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oGet1:<span style="color: #000000;">bKeyDown</span> := <span style="color: #000000;">&#123;</span> |nkey| RK_SetNum<span style="color: #000000;">&#40;</span>nKey, <span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">10</span>, <span style="color: #000000;">150</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Ok"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> cText1 <span style="color: #000000;">&#41;</span><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; &nbsp; &nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">FUNCTION</span> RK_SetNum<span style="color: #000000;">&#40;</span>nKey, nDec<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">LOCAL</span> cTekst := oGet1:<span style="color: #000000;">GetText</span><br /><br /><span style="color: #00C800;">IF</span> nDec > <span style="color: #000000;">0</span><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> nkey >= <span style="color: #0000ff;">ASC</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"0"</span><span style="color: #000000;">&#41;</span> .AND. nKey <= <span style="color: #0000ff;">ASC</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"9"</span><span style="color: #000000;">&#41;</span> .OR. nKey == <span style="color: #0000ff;">ASC</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"."</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> <span style="color: #00C800;">AT</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"."</span>, cTekst<span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> LEN<span style="color: #000000;">&#40;</span>cTekst<span style="color: #000000;">&#41;</span> > <span style="color: #00C800;">AT</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"."</span>, cTekst<span style="color: #000000;">&#41;</span> + nDec<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cTekst := <span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span>cTekst, <span style="color: #000000;">1</span>,LEN<span style="color: #000000;">&#40;</span>cTekst<span style="color: #000000;">&#41;</span><span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; <span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cTekst := <span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span>cTekst, <span style="color: #000000;">1</span>,LEN<span style="color: #000000;">&#40;</span>cTekst<span style="color: #000000;">&#41;</span><span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> nkey >= <span style="color: #0000ff;">ASC</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"0"</span><span style="color: #000000;">&#41;</span> .AND. nKey <= <span style="color: #0000ff;">ASC</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"9"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cTekst := <span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span>cTekst, <span style="color: #000000;">1</span>,LEN<span style="color: #000000;">&#40;</span>cTekst<span style="color: #000000;">&#41;</span><span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; oGet1:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>cTekst<span style="color: #000000;">&#41;</span> &nbsp; && I will put this in the oGet1:<span style="color: #000000;">bKeyDown</span> <span style="color: #00C800;">method</span><br /><br /><span style="color: #00C800;">RETURN</span><br />&nbsp;</div>[/code:111kq06u]
several questions about GET class
Hello Manuel, I have changed the code a bit and now it looks like it is working correct. You can use the backspace, arrows left and right and enter key. Can you please revice this if it is helpfull. [code=fw:doar4325]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveMac.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,oGet1<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cNumText := <span style="color: #ff0000;">""</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cTekst<br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"TestGetNum"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">400</span>, <span style="color: #000000;">100</span> FLIPPED<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <span style="color: #000000;">40</span>, <span style="color: #000000;">30</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Text1:"</span> <span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;@ <span style="color: #000000;">40</span>, <span style="color: #000000;">90</span> <span style="color: #0000ff;">GET</span> oGet1 <span style="color: #0000ff;">VAR</span> cNumText <span style="color: #0000ff;">OF</span> oDlg TOOLTIP <span style="color: #ff0000;">"a string with cross"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">250</span>, <span style="color: #000000;">25</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oGet1:<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>nKey < <span style="color: #000000;">127</span> .AND. nKey <> <span style="color: #000000;">13</span>, <span style="color: #000000;">&#40;</span>cTekst := RK_SetNum<span style="color: #000000;">&#40;</span>nKey, <span style="color: #000000;">3</span>, oGet1:<span style="color: #000000;">GetText</span><span style="color: #000000;">&#41;</span>, oGet1:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>cTekst<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; oGet1:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">10</span>, <span style="color: #000000;">150</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Ok"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> oGet1:<span style="color: #000000;">GetText</span> <span style="color: #000000;">&#41;</span><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; &nbsp; &nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">FUNCTION</span> RK_SetNum<span style="color: #000000;">&#40;</span>nKey, nDec, cTekst<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">IF</span> nDec > <span style="color: #000000;">0</span><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> nkey >= <span style="color: #0000ff;">ASC</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"0"</span><span style="color: #000000;">&#41;</span> .AND. nKey <= <span style="color: #0000ff;">ASC</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"9"</span><span style="color: #000000;">&#41;</span> .OR. nKey == <span style="color: #0000ff;">ASC</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"."</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> <span style="color: #00C800;">AT</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"."</span>, cTekst<span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> LEN<span style="color: #000000;">&#40;</span>cTekst<span style="color: #000000;">&#41;</span> > <span style="color: #00C800;">AT</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"."</span>, cTekst<span style="color: #000000;">&#41;</span> + nDec<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cTekst := <span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span>cTekst, <span style="color: #000000;">1</span>,LEN<span style="color: #000000;">&#40;</span>cTekst<span style="color: #000000;">&#41;</span><span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; <span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cTekst := <span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span>cTekst, <span style="color: #000000;">1</span>,LEN<span style="color: #000000;">&#40;</span>cTekst<span style="color: #000000;">&#41;</span><span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span> nkey >= <span style="color: #0000ff;">ASC</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"0"</span><span style="color: #000000;">&#41;</span> .AND. nKey <= <span style="color: #0000ff;">ASC</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"9"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; cTekst := <span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span>cTekst, <span style="color: #000000;">1</span>,LEN<span style="color: #000000;">&#40;</span>cTekst<span style="color: #000000;">&#41;</span><span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span> cTekst<br />&nbsp;</div>[/code:doar4325]
several questions about GET class
René, Very good <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Glad to see that with your great feedback and Manuel's expertise, FiveMac is moving ahead <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) -->
several questions about GET class
Hello Antonio, Thank you, In my opinion FiveMac is a very good tool to build apps with. Specialy because one can use a lot of code used with FiveWin. <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> The example I posted is not completely working correct. <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> When a user puts in some digits and than move back with the left arrow, he can put in alphanumeric char's. But I think that this is solvable in the function. I will make some adjustments in the next days and let you know. <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
several questions about GET class
Hello Antonio and Manuel, I have addapted the function for the numeric input in a get. Now it works pretty good. One can put only numeric values into get and a point if specified. Also one can go back with the arrow-left and put alphanumeric values wich are not excepted. For my use it is enough, hope other users find it usefull. [code=fw:3japz2ix]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveMac.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oDlg,oGet1<br />   <span style="color: #00C800;">local</span> cNumText := <span style="color: #ff0000;">""</span><br />   <span style="color: #00C800;">local</span> cTekst<br />      <br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"TestGetNum"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">400</span>, <span style="color: #000000;">100</span> FLIPPED<br />   <br />   @ <span style="color: #000000;">40</span>, <span style="color: #000000;">30</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Text1:"</span> <span style="color: #0000ff;">OF</span> oDlg<br />   <br />   @ <span style="color: #000000;">40</span>, <span style="color: #000000;">90</span> <span style="color: #0000ff;">GET</span> oGet1 <span style="color: #0000ff;">VAR</span> cNumText <span style="color: #0000ff;">OF</span> oDlg TOOLTIP <span style="color: #ff0000;">"a string with cross"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">250</span>, <span style="color: #000000;">25</span><br />        oGet1:<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>nKey < <span style="color: #000000;">127</span> .AND. nKey <> <span style="color: #000000;">13</span>, <span style="color: #000000;">&#40;</span>cTekst := RK_SetNum<span style="color: #000000;">&#40;</span>nKey, <span style="color: #000000;">2</span>, oGet1:<span style="color: #000000;">GetText</span><span style="color: #000000;">&#41;</span>, oGet1:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span>cTekst<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />        oGet1:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   @ <span style="color: #000000;">10</span>, <span style="color: #000000;">150</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Ok"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> oGet1:<span style="color: #000000;">GetText</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;">FUNCTION</span> RK_SetNum<span style="color: #000000;">&#40;</span>nKey, nDec, cNumString<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">LOCAL</span> nPlace := <span style="color: #00C800;">AT</span><span style="color: #000000;">&#40;</span>CHR<span style="color: #000000;">&#40;</span>nKey<span style="color: #000000;">&#41;</span>, cNumString<span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #00C800;">IF</span> nDec > <span style="color: #000000;">0</span><br />        <span style="color: #00C800;">IF</span> nkey >= <span style="color: #0000ff;">ASC</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"0"</span><span style="color: #000000;">&#41;</span> .AND. nKey <= <span style="color: #0000ff;">ASC</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"9"</span><span style="color: #000000;">&#41;</span> .OR. nKey == <span style="color: #0000ff;">ASC</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"."</span><span style="color: #000000;">&#41;</span><br />            <span style="color: #00C800;">IF</span> <span style="color: #00C800;">AT</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"."</span>, cNumString<span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span><br />                cNumString := STRTRAN<span style="color: #000000;">&#40;</span>cNumString, <span style="color: #ff0000;">".."</span>, <span style="color: #ff0000;">"."</span><span style="color: #000000;">&#41;</span><br />                <span style="color: #00C800;">IF</span> LEN<span style="color: #000000;">&#40;</span>cNumString<span style="color: #000000;">&#41;</span> > <span style="color: #00C800;">AT</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"."</span>, cNumString<span style="color: #000000;">&#41;</span> + nDec<br />                    cNumString := <span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span>cNumString, <span style="color: #000000;">1</span>,LEN<span style="color: #000000;">&#40;</span>cNumString<span style="color: #000000;">&#41;</span><span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span><br />                <span style="color: #00C800;">ENDIF</span><br />            <span style="color: #00C800;">ENDIF</span><br />        <span style="color: #00C800;">ELSE</span><br />            <span style="color: #00C800;">IF</span> nPlace == LEN<span style="color: #000000;">&#40;</span>cNumString<span style="color: #000000;">&#41;</span><br />                cNumString := <span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span>cNumString, <span style="color: #000000;">1</span>,LEN<span style="color: #000000;">&#40;</span>cNumString<span style="color: #000000;">&#41;</span><span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span><br />            <span style="color: #00C800;">ELSE</span><br />                cNumString := <span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span>cNumString, <span style="color: #000000;">1</span>, nPlace<span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span> + <span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span>cNumString, nPlace<span style="color: #000000;">+1</span>, LEN<span style="color: #000000;">&#40;</span>cNumString<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />            <span style="color: #00C800;">ENDIF</span><br />        <span style="color: #00C800;">ENDIF</span><br />    <span style="color: #00C800;">ELSE</span><br />        <span style="color: #00C800;">IF</span> nkey >= <span style="color: #0000ff;">ASC</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"0"</span><span style="color: #000000;">&#41;</span> .AND. nKey <= <span style="color: #0000ff;">ASC</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"9"</span><span style="color: #000000;">&#41;</span><br />            *<span style="color: #00C800;">do</span> nothng<br />        <span style="color: #00C800;">ELSE</span><br />            <span style="color: #00C800;">IF</span> nPlace == LEN<span style="color: #000000;">&#40;</span>cNumString<span style="color: #000000;">&#41;</span><br />                cNumString := <span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span>cNumString, <span style="color: #000000;">1</span>,LEN<span style="color: #000000;">&#40;</span>cNumString<span style="color: #000000;">&#41;</span><span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span><br />            <span style="color: #00C800;">ELSE</span><br />                cNumString := <span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span>cNumString, <span style="color: #000000;">1</span>, nPlace<span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span> + <span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span>cNumString, nPlace<span style="color: #000000;">+1</span>, LEN<span style="color: #000000;">&#40;</span>cNumString<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />            <span style="color: #00C800;">ENDIF</span><br />        <span style="color: #00C800;">ENDIF</span><br />    <span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span> cNumString<br /> </div>[/code:3japz2ix]
several questions about GET class
new libs for test ( copy old libs ) . Changes for numeric gets . ( in test ) <!-- m --><a class="postlink" href="https://www.dropbox.com/s/oqwygwfuao1taux/librerias.zip?dl=0">https://www.dropbox.com/s/oqwygwfuao1ta ... s.zip?dl=0</a><!-- m --> use : local nNum := 0 // nNum -> valtype numeric @ 40, 90 GET oGet1 VAR nNum OF oDlg PICTURE "9999.99" TOOLTIP "a string with cross" SIZE 250, 25 Not use pictures "999,999.99" only digit and decimals expresion.
several questions about GET class
Hello Mauel, Thank you, this works perfect as far as I can see now.
several questions about GET class
Manuel I have been thinking about testing FiveMac and just curious if FiveMac will only run on OSX, Siera, High Siera ? .. What choice of back end's do we have ? just DBFCDX ? of can we implement ADO ( ole ) to create a client\server to a Sql Server database ? Thanks for your feedback! Rick Lipkin
several questions about GET class
Began to develop in Leopard , It has been renewed functions deprecated until the last version Hight Sierra . My computer is from last 2009 ( 10 years old ) and the last system can run. I think you do not have to have problems with Sierra. I think there's a development for mysql ( Dolpin ) <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=5&t=19442">viewtopic.php?f=5&t=19442</a><!-- l --> Exist ODBC For Mac but I've never used it and there's no development. Fivemac has limited functions with respect to Fivewin and its code is not 100% compatible, but it allows to do small development for Mac using Harbour. Saludos.
several questions about xBrowse
Hello, This is my code: [code=fw:37ebpg0b]<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 /><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> oWnd, oBrw, oCol<br />   <span style="color: #00C800;">local</span> cAlias<br /><br />   <span style="color: #B900B9;">// customer at c:\fwh\samples</span><br />   USE CUSTOMER <span style="color: #00C800;">NEW</span>  <span style="color: #0000ff;">ALIAS</span> CUSTOMER<br />   pack<br />   GO TOP<br /><br /><br />   cAlias := <span style="color: #0000ff;">Alias</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><br /><br /><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Invoice"</span><br /><br />   @ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">AUTOCOLS</span> <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"CUSTOMER"</span> CELL LINES  <span style="color: #B900B9;">//FASTEDIT</span><br /><br /><br /><br />   oBrw:<span style="color: #000000;">nMarqueeStyle</span>       := <span style="color: #000000;">4</span><br />   oBrw:<span style="color: #000000;">nColDividerStyle</span>    := LINESTYLE_BLACK<br />   oBrw:<span style="color: #000000;">lColDividerComplete</span> := .T.<br />   oBrw:<span style="color: #000000;">nHeaderLines</span>        := <span style="color: #000000;">1.5</span><br /><br /><br /><br /><br /><br />   <span style="color: #B900B9;">// Fast Edit</span><br />   oBrw:<span style="color: #000000;">nEditTypes</span> := EDIT_GET<br />   oBrw:<span style="color: #000000;">lFastEdit</span> := .t.<br /><br /><br /><br />   <span style="color: #B900B9;">//Keys</span><br />   oBrw:<span style="color: #000000;">bPastEof</span> = <span style="color: #000000;">&#123;</span>||  x_AddBlank<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span>  <span style="color: #000000;">&#125;</span>                  <span style="color: #B900B9;">// A new line if trying to go down after the last row</span><br />   oBrw:<span style="color: #000000;">bKeyDown</span> :=<span style="color: #000000;">&#123;</span> | nKey | x_Keys<span style="color: #000000;">&#40;</span>nKey, oBrw, cAlias<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>     <span style="color: #B900B9;">// </span><br /><br /><br /><br />   <span style="color: #B900B9;">// First col</span><br />   oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nEditType</span> := EDIT_GET_BUTTON<br />   oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bEditBlock</span> := <span style="color: #000000;">&#123;</span>|row, col, oCol| x_InsertData<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><br /><br /><br /><br />   oBrw:<span style="color: #000000;">bClrStd</span>:=<span style="color: #000000;">&#123;</span>|| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span>FIELD->MARRIED=.T.,<span style="color: #000000;">&#123;</span>CLR_HRED,CLR_WHITE<span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span>CLR_BLACK,CLR_WHITE<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br /><br /><br /><br /><br /><br /><br /><br />   oBrw:<span style="color: #000000;">SetRDD</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><br /><br /><br />   oWnd:<span style="color: #000000;">oClient</span>   := oBrw<br /><br /><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span><br />   CLOSE <span style="color: #00C800;">DATA</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><br /><br /><span style="color: #B900B9;">//-----------------------------------------------------------------------------</span><br /><span style="color: #00C800;">FUNCTION</span> x_Keys<span style="color: #000000;">&#40;</span>nKey, oBrw, cAlias<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Do</span> <span style="color: #00C800;">Case</span><br />   <span style="color: #00C800;">Case</span> nKey == VK_DELETE<br />       <span style="color: #00C800;">if</span> MsgNoYes<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Want to Delete?"</span>,<span style="color: #ff0000;">"D E L E T E  AT "</span>+cAlias<span style="color: #000000;">&#41;</span><br />          <span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>dbDelete<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />          <span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>__dbPack<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />           <span style="color: #B900B9;">//oBrw:GoBottom()</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;">endif</span><br /><br /><br /> <span style="color: #B900B9;">//Case nKey == VK_RETURN</span><br /> <span style="color: #B900B9;">//      msgalert("enter")</span><br /><br /><br />   <span style="color: #00C800;">Case</span> nKey == VK_INSERT<br />       x_AddBlank<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br /><br /><br /><span style="color: #00C800;">EndCase</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">//-----------------------------------------------------------------------------</span><br /><br /><br /><br /><br /><br /><span style="color: #B900B9;">//-----------------------------------------------------------------------------</span><br /><span style="color: #00C800;">FUNCTION</span> x_AddBlank<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br /> DbGoBottom<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /> APPEND BLANK<br /><br /> oBrw:<span style="color: #000000;">GoBottom</span><span style="color: #000000;">&#40;</span><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 /><br /> oBrw:<span style="color: #000000;">nColSel</span> := <span style="color: #000000;">1</span><br /> oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>:<span style="color: #00C800;">edit</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><span style="color: #B900B9;">//-----------------------------------------------------------------------------</span><br /><br /><br /><br /><br /><br /><br /><span style="color: #00C800;">function</span> x_InsertData<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />replace field->first with <span style="color: #ff0000;">"LINE "</span>+cvaltochar<span style="color: #000000;">&#40;</span>recno<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />replace field->last  with <span style="color: #ff0000;">"RANDOM VALUE "</span>+cvaltochar<span style="color: #000000;">&#40;</span>nrandom<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:37ebpg0b] I have some questions: 1.- Using the scroll, if trying to go down after the last row it executes bPastEof. Is it possible to limit that only to keydown´s key?. 2.- When adding a new line, I want to set the line to edit mode but I also want the button: [url=http&#58;//imageshack&#46;us/photo/my-images/39/xbrowse&#46;png/:37ebpg0b][img:37ebpg0b]http&#58;//img39&#46;imageshack&#46;us/img39/9222/xbrowse&#46;th&#46;png[/img:37ebpg0b][/url:37ebpg0b] Uploaded with [url=http&#58;//imageshack&#46;us:37ebpg0b]ImageShack.us[/url:37ebpg0b] 3.- When I press enter, it goes to next field. If I press enter agan, I can edit the field. Is possible with ONE enter to go to next field and edit it?. Thanks a lot.
several questions about xBrowse
Mr.UkService, [quote:20qdc41z] When I press enter, it goes to next field. If I press enter agan, I can edit the field. Is possible with ONE enter to go to next field and edit it?. [/quote:20qdc41z] This is not the normal behaviour. But anyway, respecting your requirements, I made the required changes in your code. Just have a glance. Read my comments made in UPPER CASE. Regards -Ramesh Babu P [code=fw:20qdc41z]<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;">"ord.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xbrowse.ch"</span><br /><br />REQUEST DBFCDX<br /><br /><span style="color: #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> oWnd, oBrw, oCol<br />   <span style="color: #00C800;">local</span> cAlias<br /><br />   <span style="color: #B900B9;">// customer at c:\fwh\samples</span><br />   USE CUSTOMER <span style="color: #00C800;">NEW</span>  <span style="color: #0000ff;">ALIAS</span> CUSTOMER<br />   pack<br />   GO TOP<br /><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;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Invoice"</span><br /><br />   @ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">AUTOCOLS</span> <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"CUSTOMER"</span> CELL LINES  <span style="color: #B900B9;">//FASTEDIT</span><br /><br />   oBrw:<span style="color: #000000;">nMarqueeStyle</span>       := <span style="color: #000000;">4</span><br />   oBrw:<span style="color: #000000;">nColDividerStyle</span>    := LINESTYLE_BLACK<br />   oBrw:<span style="color: #000000;">lColDividerComplete</span> := .T.<br />   oBrw:<span style="color: #000000;">nHeaderLines</span>        := <span style="color: #000000;">1.5</span><br /><br />   *YOU HAVE <span style="color: #0000ff;">TO</span> REMOVE THIS <span style="color: #0000ff;">WHEN</span> YOU WANT THE <span style="color: #0000ff;">CURSOR</span> <span style="color: #0000ff;">TO</span> GO <span style="color: #0000ff;">TO</span> <span style="color: #00C800;">NEXT</span> CELL <span style="color: #0000ff;">WHEN</span> PRESSING ENTER KEY<br />   <span style="color: #B900B9;">// Fast Edit</span><br />   *oBrw:<span style="color: #000000;">lFastEdit</span> := .t.<br /><br />   <span style="color: #B900B9;">//Keys</span><br />   oBrw:<span style="color: #000000;">bPastEof</span> = <span style="color: #000000;">&#123;</span>||  x_AddBlank<span style="color: #000000;">&#40;</span> oBrw, cAlias <span style="color: #000000;">&#41;</span>  <span style="color: #000000;">&#125;</span>          <span style="color: #B900B9;">// A new line if trying to go down after the last row</span><br />   oBrw:<span style="color: #000000;">bKeyDown</span> :=<span style="color: #000000;">&#123;</span> | nKey | x_Keys<span style="color: #000000;">&#40;</span>nKey, oBrw, cAlias<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>     <span style="color: #B900B9;">// </span><br /><br />   <span style="color: #B900B9;">// First col</span><br />   oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nEditType</span>  := EDIT_GET_BUTTON<br />   oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bEditBlock</span> := <span style="color: #000000;">&#123;</span>|row, col, oCol| x_InsertData<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />   *<span style="color: #00C800;">IF</span> YOU WANT <span style="color: #0000ff;">TO</span> <span style="color: #00C800;">EDIT</span> SELECTED COLUMNS WITH <span style="color: #00C800;">EDIT</span> <span style="color: #0000ff;">BUTTON</span> <br />   *oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nEditType</span>  := EDIT_GET_BUTTON<br />   *oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bEditBlock</span> := <span style="color: #000000;">&#123;</span>|row, col, oCol| <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"WRITE YOUR FUNCTIONALITY HERE FOR COLUMN-2"</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />   *oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nEditType</span>  := EDIT_GET_BUTTON<br />   *oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bEditBlock</span> := <span style="color: #000000;">&#123;</span>|row, col, oCol| <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"WRITE YOUR FUNCTIONALITY HERE FOR COLUMN-3"</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />   *oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">7</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nEditType</span>  := EDIT_GET_BUTTON<br />   *oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">7</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bEditBlock</span> := <span style="color: #000000;">&#123;</span>|row, col, oCol| <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"WRITE YOUR FUNCTIONALITY HERE FOR COLUMN-7"</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />   *<span style="color: #00C800;">IF</span> YOU WANT EDIT_GET_BUTTON <span style="color: #00C800;">FOR</span> ALL THE COLUMNS<br />   AEval<span style="color: #000000;">&#40;</span>oBrw:<span style="color: #000000;">aCols</span>, <span style="color: #000000;">&#123;</span>|x|x:<span style="color: #000000;">nEditType</span> := EDIT_GET_BUTTON<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br /><br />   *WRITE bEditBlock <span style="color: #00C800;">for</span> every column HERE<br /><br />   oBrw:<span style="color: #000000;">bClrStd</span>:=<span style="color: #000000;">&#123;</span>|| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span>FIELD->MARRIED=.T.,<span style="color: #000000;">&#123;</span>CLR_HRED,CLR_WHITE<span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span>CLR_BLACK,CLR_WHITE<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br /><br />   oBrw:<span style="color: #000000;">SetRDD</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   oWnd:<span style="color: #000000;">oClient</span>   := oBrw<br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span><br />   CLOSE <span style="color: #00C800;">DATA</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//-----------------------------------------------------------------------------</span><br /><br /><span style="color: #00C800;">FUNCTION</span> x_Keys<span style="color: #000000;">&#40;</span>nKey, oBrw, cAlias<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">local</span> nOldKey<br /><br /><span style="color: #00C800;">Do</span> <span style="color: #00C800;">Case</span><br />   <span style="color: #00C800;">Case</span> nKey == VK_DELETE<br />       <span style="color: #00C800;">if</span> MsgNoYes<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Want to Delete?"</span>,<span style="color: #ff0000;">"D E L E T E  AT "</span>+cAlias<span style="color: #000000;">&#41;</span><br />          nOldKey := oBrw:<span style="color: #000000;">KeyNo</span> <br />          <span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>dbDelete<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />          <span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>__dbPack<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />          <span style="color: #B900B9;">//oBrw:GoBottom()</span><br />          oBrw:<span style="color: #000000;">KeyNo</span> := <span style="color: #0000ff;">MIN</span><span style="color: #000000;">&#40;</span>nOldKey<span style="color: #000000;">-1</span>,RECCOUNT<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />          oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span>.F.<span style="color: #000000;">&#41;</span><br />       <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">Case</span> nKey == VK_RETURN<br />        *THIS LINE MOVES THE <span style="color: #0000ff;">CURSOR</span> <span style="color: #0000ff;">TO</span> <span style="color: #00C800;">NEXT</span> CELL <br />        oBrw:<span style="color: #000000;">nColSel</span>++ <span style="color: #B900B9;">//msgalert("enter")</span><br />        *THIS LINE MOVES THE <span style="color: #0000ff;">CURSOR</span> BACK <span style="color: #0000ff;">TO</span> ORIGINAL CELL <span style="color: #0000ff;">ON</span> EDITING<br />        oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>oBrw:<span style="color: #000000;">nColSel</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bOnPostEdit</span> := <span style="color: #000000;">&#123;</span>||oBrw:<span style="color: #000000;">nColSel</span>--<span style="color: #000000;">&#125;</span><br /><br />   <span style="color: #00C800;">Case</span> nKey == VK_INSERT<br />       x_AddBlank<span style="color: #000000;">&#40;</span> oBrw, cAlias <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">EndCase</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//-----------------------------------------------------------------------------</span><br /><br /><span style="color: #00C800;">FUNCTION</span> x_AddBlank<span style="color: #000000;">&#40;</span> oBrw, cAlias <span style="color: #000000;">&#41;</span><br /><br />*THIS CONDITION WILL PREVENT AUTOMATIC PROCESSING <span style="color: #0000ff;">OF</span> bPatEof <span style="color: #0000ff;">WHEN</span> USED MOUSEWHEEL <br /><span style="color: #00C800;">if</span> MsgNoYes<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Want to Add new Record?"</span>,<span style="color: #ff0000;">"New Record in "</span>+cAlias<span style="color: #000000;">&#41;</span><br />   APPEND BLANK<br />   oBrw:<span style="color: #000000;">refreshCurrent</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oBrw:<span style="color: #000000;">nColSel</span> := <span style="color: #000000;">1</span><br />   oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>:<span style="color: #00C800;">edit</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">//-----------------------------------------------------------------------------</span><br /><br /><span style="color: #00C800;">function</span> x_InsertData<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />replace field->first with <span style="color: #ff0000;">"LINE "</span>+cvaltochar<span style="color: #000000;">&#40;</span>recno<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />replace field->last  with <span style="color: #ff0000;">"RANDOM VALUE "</span>+cvaltochar<span style="color: #000000;">&#40;</span>nrandom<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">//-----------------------------------------------------------------------------</span><br /><br /> </div>[/code:20qdc41z]
several questions about xBrowse
Mr. Ramesh, Yes, thank you very much. It works as desired!!. Xbrowse is extraordinary great. The only issue is that when I press enter and I type a value, when I press enter again changes are not saved. How can I save them?. Thanks a lot.
several questions about xBrowse
Mr.ukservice, [quote:2uyzu6is] Yes, thank you very much. It works as desired!!. Xbrowse is extraordinary great. [/quote:2uyzu6is] Happy to note that I could help you. <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> Change the bPostOnEdit line shown as under: [code=fw:2uyzu6is]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   <span style="color: #00C800;">Case</span> nKey == VK_RETURN<br />        *THIS LINE MOVES THE <span style="color: #0000ff;">CURSOR</span> <span style="color: #0000ff;">TO</span> <span style="color: #00C800;">NEXT</span> CELL <br />        oBrw:<span style="color: #000000;">nColSel</span>++ <span style="color: #B900B9;">//msgalert("enter")</span><br />        *THIS LINE MOVES THE <span style="color: #0000ff;">CURSOR</span> BACK <span style="color: #0000ff;">TO</span> ORIGINAL CELL <span style="color: #0000ff;">ON</span> EDITING<br />&nbsp; &nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>oBrw:<span style="color: #000000;">nColSel</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bOnPostEdit</span> := <span style="color: #000000;">&#123;</span>|x|x:<span style="color: #000000;">Value</span> := x:<span style="color: #000000;">oEditGet</span>:<span style="color: #000000;">Value</span>,oBrw:<span style="color: #000000;">nColSel</span>--<span style="color: #000000;">&#125;</span><br /> </div>[/code:2uyzu6is] - Ramesh Babu
several questions about xBrowse
Mr. Ramesh, Thank you very much again for your help. It works as desired. One little last thing. When doing double click it edits and selects the field with all field including spaces. Is it possible to exclude spaces, as the picture?. [url=http&#58;//imageshack&#46;us/photo/my-images/192/xbrowsegreat&#46;png/:3pj77bkl][img:3pj77bkl]http&#58;//img192&#46;imageshack&#46;us/img192/1151/xbrowsegreat&#46;th&#46;png[/img:3pj77bkl][/url:3pj77bkl] Uploaded with [url=http&#58;//imageshack&#46;us:3pj77bkl]ImageShack.us[/url:3pj77bkl] Thanks again so much.
several questions about xBrowse
Mr.ukservice, [quote:37hlkhxl] When doing double click it edits and selects the field with all field including spaces. Is it possible to exclude spaces, as the picture?. [/quote:37hlkhxl] This is the default behaviour. You should be able to edit the field value to its maximum width defined in the Structure. In case you want to reduce the edit width, you have to use a PICTURE clause for each Column. Regards, - Ramesh Babu P
several questions about xBrowse
::obrow := TXBrowse():New( odlg ) obrow:=::obrow obrow:SetMySQL(odb2) obrow:bKeyDown := {|nKey|::sto0120(nkey), if(::ledit,if(nKey==VK_DELETE .and. LEN(ALLTRIM(odb1:stockid))>0, (if(msgyesno2("??????","???"),(::sto0103(odb2:qty,0,,.t.),odb2:DELETE(),obrow:Refresh()),)),if(nKey==VK_INSERT .and. LEN(ALLTRIM(odb1:stockid))>0,(obrow:gobottom(),obrow:godown()),)),) } oCol := obrow:AddCol() oCol:bStrData := { ||odb2:itemid} oCol:cHeader := citemtitle+"??" ocol:beditvalue:={||odb2:itemid} oCol:nedittype:= {||if(::ledit .and. LEN(ALLTRIM(odb1:stockid))>0.and.odb2:qty==0,EDIT_GET_BUTTON,0)} oCol:bEditBlock:={||goods2brw(odb2:itemid,,,self,odb1:stockid)} // itemid,lvalid,unitid,lmulti oCol:cEditPicture:="@!" oCol:bOnPostEdit := {|o, v, n| if( n != VK_ESCAPE .and. v != odb2:itemid,; (if(!odb2:EOF(),; (v:=goods2brw(v,.t.,@unitid2,self,odb1:stockid),odb2:unitpri:=sto0109(self,v),itemid1:=odb2:itemid,odb2:itemid:=v,mid1:=odb2:mid,unitid1:=odb2:unitid,odb2:unitid:=unitid2,odb2:SAVE()),; (v:=goods2brw(v,.t.,@unitid2,self,odb1:stockid),odb2:unitpri:=sto0109(self,v),odb2:itemid:=v,odb2:invono:=::invono1,odb2:unitid:=unitid2,odb2:APPEND(),if(odb2:LASTREC()==1,::oget107:refresh(),)); )); , ; ) } ocol:ctooltip:="?????,????,????????" oCol := obrow:AddCol() oCol:bStrData := { ||if(odb2:qty==0,"",odb2:qty)} // show 0 as space oCol:cHeader := "??" ocol:beditvalue:={||odb2:qty} ocol:nedittype:={||if(::ledit.and.!odb2:EOF(),1,0)} oCol:bOnPostEdit := {|o, v, n| if( n != VK_ESCAPE .and. v != odb2:qty,(if(::sto0103(odb2:qty,v),(odb2:qty:=v,odb2:SAVE()),)),)} oCol:nDataStrAlign := AL_RIGHT oCol:cFooter :=" " oCol:nFootStrAlign:= AL_RIGHT oCol:nWidth := 65 Col := obrow:AddCol() oCol:bStrData := { ||odb2:lfinish} oCol:cHeader :={||if(lright, "??","Hide")} oCol:nEditType := {||if(::ledit .and. !odb2:EOF(),4,0)} ocol:aEditListTxt:={" ","Y"} ocol:aEditListBound:={" ","Y"} oCol:bOnPostEdit := {|o, v, n| if( n != VK_ESCAPE .and. v != odb2:lfinish,(odb2:lfinish:=v,odb2:save()) , ) } oCol:nWidth :=30 oCol := obrow:AddCol() oCol:bStrData := { ||::cpath1+"\sub\"+cvaltochar(odb2:imgid)+".jpg"} oCol:cHeader := "??" ocol:cdatatype:="F" // we change oCol:cHeader and oCol:nEditType to block, so can dynamic control Shuming Wang
several questions about xBrowse
Thank you very much. I tried oBrw:aCols[ 2 ]:cEditPicture:="@!" but does not work. What is the picture clause to remove spaces?. Thank you very much.
several questions about xBrowse
up
several questions about xBrowse
up
several questions about xBrowse
A picture to remove spaces doesn't exist, as far as I know. EMG
several questions about xBrowse
[quote="Enrico Maria Giordano":38kke32l]A picture to remove spaces doesn't exist, as far as I know[/quote:38kke32l] I think so too.
several questions about xBrowse
Thank you very much. Mr. Rao said: [quote:5gz1xjtl]oBrw:aCols[n]:bEditValue := { |x| If( x == nil, Trim(<fieldname>), ( <fieldname> := x, Trim(x) ) } I do not know why you want this behavior. Users will not be able to enter longer value than the trimmed value shown in the browse[/quote:5gz1xjtl]
shared
Hola Usando mobile-5 no me acepta la clausula SHARED. He visto varios comentarios en el foro pero no llego a entender en que casos funciona y en cuales no. Como es para un cliente nuevo agradecería que me dijerais con que pda - so - red os funciona. Gracias
shared
Jose, Que error te da ?
shared
Hola Antonio USE (cFich) NEW VIA "DBFCDX" ALIAS TIC //SHARED Sin la clausula SHARED funciona perfectamente en el emulador y en la pda Symbol mc-70. Cuando pongo SHARED en el emulador se queda colgado y pone al 100% el procesador. En la pda se queda colgado y preciso de un softreset. Saludos
shared
Jose, Pues por lo que parece no lo puedes usar con SHARED. Tendrás que usar una DBF temporal u otra solución.
shared
Gracias Antonio. Para este caso (en que la conectividad esta asegurda en todo el almacen) una solución muy buena es la que propone Astursoft que es usar Terminal Server. La solución con ficheros temporales es posible, pero engorrosa. Si a alguien le funciona SHARED que por favor nos diga como lo hace.
sharing dbf files via internet
Hi, Mary christmas to all fivewinners!!!. I have a dedicated server hosted in a ISP with samba to share files under Windows. I would like to access those files for several customers as \\server´s ip (i. e. use \\195.53.1.2\data\customer.dbf). It works but too slow, particulary when open files at program start or when indexing. The final users have a DSL connection. Is there a way to improve the speed?. Using ado?. Thank you for your help!!!. Regards.
sharing fivetech programs
Hallo, Can someone name me a free program in wich I can share my fivetech program (with his files) with my friends of our local foodbank I tried MS Teams, Dropbox, Google Drive, OneNote,... but they accept only the classic files as Word, Excel, Powerpoint, etcetera Thank you José Deschutter (1947) Belgium
sharing fivetech programs
The best option is to create a repository in GITHUB and make it public or private sharing with the people you consider.
sharing fivetech programs
+1
sharing fivetech programs
Antonio What means +1 José
sharing fivetech programs
I created a repository in GitHub and I put all my files in it. How can I launch the exe file?
sharing fivetech programs
[url:31nt0c3q]https&#58;//mega&#46;nz/[/url:31nt0c3q]
sharing fivetech programs
[url:1xvkqzl4]https&#58;//product&#46;hubspot&#46;com/blog/git-and-github-tutorial-for-beginners[/url:1xvkqzl4] [url:1xvkqzl4]https&#58;//lab&#46;github&#46;com/githubtraining/introduction-to-github[/url:1xvkqzl4] gitgub is a server for git repository git is a versioning system for source codes The idea is to share the code between the member of a team in a way that everyone has the last version of the code and can see who did the modifications
sharing fivetech programs
Jose, "+1" means, "I agree with the previous poster's comment." James