topic
stringlengths
1
63
text
stringlengths
1
577k
:Click() error when TButton is disabled
Maurilio, Thanks <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> This way seems a little better: [code:2lbjgxgf] if ! &#58;&#58;lProcessing &#58;&#58;lProcessing = &#46;t&#46; if &#58;&#58;bWhen != nil &#46;and&#46; ! Eval&#40; &#58;&#58;bWhen &#41; &#58;&#58;lProcessing = &#46;f&#46; return nil endif &#46;&#46;&#46; [/code:2lbjgxgf]
:Click() error when TButton is disabled
Thanks, Antonio! Regards, Maurilio
:SetFocus problem with WHEN clause in Gets and Pushbuttons
I have a problem with :SetFocus() In the following code I have three gets and three pushbuttons. By default the Gets are disabled and when the "Create" button is pressed, the gets should be enabled and the focus should be placed on the 1st get. The "Create" and "Save" functions of my code below is working Ok enabling and disabling the gets. But the oGet1:SetFocus() in Create() function and oBtn1:SetFocus() in Save() function are not working at all. I tried with oDlg:Update() and oDlg:Refresh() also in both Create() and Save() functions without sucess. Can anybody look into the code and suggest me where I am going wrong? I am using FWH 2.8 (September Build) + xHarbour 0.99.61 (Simplex) Thanks - Ramesh Babu P [code:18tn724t] #include "fivewin&#46;ch" FUNCTION main&#40;&#41; LOCAL oDlg, oGet1, oGet2, oGet3, oBtn1, oBtn2, oBtn3, cGet1, cGet2, cGet3 LOCAL lCreate &#58;= &#46;T&#46;, lSave &#58;= &#46;F&#46;, lGo &#58;= &#46;F&#46; STORE SPACE&#40;30&#41; TO cGet1, cGet2, cGet3 DEFINE DIALOG oDlg RESOURCE "TESTFOCUS" REDEFINE GET oGet1 VAR cGet1 ID 101 OF oDlg UPDATE WHEN lGo REDEFINE GET oGet2 VAR cGet2 ID 102 OF oDlg UPDATE WHEN lGo REDEFINE GET oGet3 VAR cGet3 ID 103 OF oDlg UPDATE WHEN lGo REDEFINE BUTTON oBtn1 ID 104 OF oDlg WHEN lCreate ; UPDATE ACTION Create&#40;@lCreate,@lSave,@lGo,@oGet1&#41; REDEFINE BUTTON oBtn2 ID 105 OF oDlg WHEN lSave ; UPDATE ACTION Save&#40;@lCreate,@lSave,@lGo,@oBtn1&#41; REDEFINE BUTTON oBtn3 ID 106 OF oDlg ACTION oDlg&#58;End&#40;&#41; ACTIVATE DIALOG oDlg CENTERED ON INIT oBtn1&#58;SetFocus&#40;&#41; RETURN nil ********** FUNCTION Create&#40;lCreate, lSave, lGo, oGet1&#41; lSave &#58;= &#46;T&#46; lCreate &#58;= &#46;F&#46; lGo &#58;= &#46;T&#46; oGet1&#58;SetFocus&#40;&#41; RETURN nil ********** FUNCTION Save&#40;lCreate, lSave, lGo, oBtn1&#41; lSave &#58;= &#46;F&#46; lCreate &#58;= &#46;T&#46; lGo &#58;= &#46;F&#46; oBtn1&#58;SetFocus&#40;&#41; RETURN nil ********** /**************************************************************************** get&#46;rc produced by Borland Resource Workshop *****************************************************************************/ TESTFOCUS DIALOG 6, 15, 207, 113 STYLE DS_MODALFRAME | 0x4L | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Testing Focus" FONT 8, "MS Sans Serif" &#123; GROUPBOX "", 301, 8, 3, 192, 82, BS_GROUPBOX LTEXT "Get - 1", -1, 20, 23, 30, 8 EDITTEXT 101, 58, 20, 132, 13 LTEXT "Get - 2", -1, 19, 44, 30, 8 EDITTEXT 102, 58, 41, 132, 13 LTEXT "Get - 3", -1, 19, 65, 30, 8 EDITTEXT 103, 58, 62, 132, 13 PUSHBUTTON "&Create", 104, 74, 92, 40, 15 PUSHBUTTON "&Save", 105, 117, 92, 40, 15 PUSHBUTTON "&Ok", 106, 160, 92, 40, 15 &#125; [/code:18tn724t]
:SetFocus problem with WHEN clause in Gets and Pushbuttons
Ramesh, Try this: oGet1:PostMsg( WM_SETFOCUS ) instead of oGet1:SetFocus()
:SetFocus problem with WHEN clause in Gets and Pushbuttons
Mr.Antonio Amazing to get a solution in 5 minues time. It is working now Ok. Thank you very much. BTW, why :SetFocus() is not working! Regards to you - Ramesh Babu P
:SetFocus problem with WHEN clause in Gets and Pushbuttons
Hi Mr.Antonio Once the focus is passed on to a get with oGet1:PostMsg(EM_SETFOCUS) and when I click on any other controls or press tab, the blinking cursor is still showing on old control (oGet1) and bLostFocus is also not working properly. Just add the following lines to the above code after redefinition of GETS, implement the oGet1:SetFocus(WM_SETFOCUS) in place of oGet1:SetFocus(), oBtn1:SetFocus(WM_SETFOCUS) in place of oBtn1:SetFocus() and test it. You will find the anomaly. [code:2ayt9kra] oGet1&#58;bGotFocus &#58;= &#123;||oGet1&#58;SetColor&#40;nRGB&#40;0,0,0&#41;, nRGB&#40;193,193,255&#41;&#41;&#125; oGet1&#58;bLostFocus &#58;= &#123;||oGet1&#58;SetColor&#40;nRGB&#40;0,0,0&#41;, nRGB&#40;255,255,255&#41;&#41;&#125; [/code:2ayt9kra] Thanks to you - Ramesh Babu P
:SetFocus problem with WHEN clause in Gets and Pushbuttons
Ramesh, Try this: oGet1:PostMsg( WM_SETFOCUS ) oBtn1:oJump = oGet1
:SetFocus problem with WHEN clause in Gets and Pushbuttons
Ramesh, > BTW, why :SetFocus() is not working Because Windows returns the focus to the button, after processing the ACTION of the button, so we can not interrupt that process.
:SetFocus problem with WHEN clause in Gets and Pushbuttons
Hello Mr.Antonio Thanks again for immediate attention. [quote:1mje3lqr] oBtn1:oJump = oGet1 [/quote:1mje3lqr] If we do not know in advance that the user will jump to oGet1 from oBtn1? Thanks Ramesh Babu P
:SetFocus problem with WHEN clause in Gets and Pushbuttons
Ramesh, > If we do not know in advance that the user will jump to oGet1 from oBtn1? You set it from the Create() function where you know where it will go.
:SetFocus problem with WHEN clause in Gets and Pushbuttons
Mr.Antonio Kindly test the above code with the changes you have suggested and give me the suitable solution please. I tried with the all your suggestions with fail. Regards to you - Ramesh Babu P
:SetFocus problem with WHEN clause in Gets and Pushbuttons
Ramesh, [code:keztvzom] FUNCTION Create&#40;lCreate, lSave, lGo, oGet1 &#41; lSave &#58;= &#46;T&#46; lCreate &#58;= &#46;F&#46; lGo &#58;= &#46;T&#46; oGet1&#58;PostMsg&#40; WM_LBUTTONDOWN &#41; oGet1&#58;PostMsg&#40; WM_LBUTTONUP &#41; RETURN nil [/code:keztvzom]
:SetFocus problem with WHEN clause in Gets and Pushbuttons
Mr.Antonio Thank you very much for your reply. After spending some time on this, I could get the required effect with the following statement. [quote:xmxfaeqj] oGet1:PostMsg( WM_RBUTTONDOWN ) [/quote:xmxfaeqj] Regards to you - Ramesh Babu P
:Setfilter from a defined substring ?
Hello, I must use oCust:setfilter from a substring That works perfect <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> [color=#008000:y3eve3ly][b:y3eve3ly]oCust:ORDSCOPE(0, cLast ) oCust:ORDSCOPE(1, cLast ) [/b:y3eve3ly][/color:y3eve3ly] but I want to show the solution using oCust:SetFilter( ... ) <!-- s:!: --><img src="{SMILIES_PATH}/icon_exclaim.gif" alt=":!:" title="Exclamation" /><!-- s:!: --> // the index oCust:CreateIndex( "CUSTOMER", "CUST1", "UPPER(LAST)", .F. ) // the defined get to be filtered ( substring of field oCust:last using [color=#0000FF:y3eve3ly]< clast >[/color:y3eve3ly] ) @ 55, 700 GET oGet[1] VAR [color=#0000FF:y3eve3ly]cLast [/color:y3eve3ly] SIZE 100, 22 PICTURE "!!!!!!!!!!" PIXEL UPDATE // 10 chars of field < last > C 20 // the function call ACTION ( SET_FILTER( "Filter", nOption, [color=#0000FF:y3eve3ly]ALLTRIM(cLast )[/color:y3eve3ly], nAge1, nAge2, dDate1, dDate2, lMarried1, lMarried2 ) // field < oCust:last > needed to be filtered // 'AC' must be replaced with the trimmed -> [color=#0000FF:y3eve3ly]cLast [/color:y3eve3ly]( from the get-field ) // 2 must be replaced with LEN( [color=#0000FF:y3eve3ly]cLast[/color:y3eve3ly] ) // works with fixed values <!-- s:!: --><img src="{SMILIES_PATH}/icon_exclaim.gif" alt=":!:" title="Exclamation" /><!-- s:!: --> [color=#008000:y3eve3ly][b:y3eve3ly]oCust:SetFilter( " SUBSTR( UPPER( Last ), 1, 2 ) == 'AC' " ) [/b:y3eve3ly][/color:y3eve3ly] // is OK and is filtering -> Acker another working filter shows the a range of age oCust:SetFilter( " Age >= " + STR( nAge1 ) + " .and. Age <= " + STR( nAge2 ) ) I tested different solutions but didn't work regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
:Setfilter from a defined substring ?
[quote:1kh6f0o7]oCust:SetFilter( " SUBSTR( UPPER( Last ), 1, 2 ) == 'AC' " ) // is OK and is filtering -> Acker [/quote:1kh6f0o7] This can be written as: oCust:SetFilter( "UPPER(LAST) = 'AC'" ) // single "=". Not "==" After getting cLast, you can build the filter like this: oCust:SetFilter( "UPPER(LAST) = '" + Trim( cLast ) + "'" )
:Setfilter from a defined substring ?
Works perfect <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> thank You very much sometimes I'm thinking to complicated <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> [quote:3gnzdcub]After getting cLast, you can build the filter like this: oCust:SetFilter( "UPPER(LAST) = '" + Trim( cLast ) + "'" )[/quote:3gnzdcub] regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
:Setfilter from a defined substring ?
May I still ask for another solution ? I need a filterstring for a date-range field [color=#0000FF:ktswruay]Hiredate[/color:ktswruay] from customer.dbf defined date-vars [color=#0000FF:ktswruay]dDate1[/color:ktswruay] and [color=#0000FF:ktswruay]dDate2[/color:ktswruay] to filter a date-range that means for a empty dDate2 1) [color=#0000FF:ktswruay]oCust:Hiredate >= dDate1[/color:ktswruay] and with defined dDate1 and !empty dDate2 2) [color=#0000FF:ktswruay]oCust:Hiredate >= dDate1 .and. oCust:Hiredate <= dDate2 [/color:ktswruay] I tested different string-combinations without any useful results. adding this missing test I can post a new download Thank You very much regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
:Setfilter from a defined substring ?
Have you tried with my_filter = "dtos(oCust:Hiredate) >= dtos(" + ctod(dDate1) + ")" oCust:SetFilter(my_filter)
:Setfilter from a defined substring ?
[code=fw:34t6rpx2]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; cFilter &nbsp; &nbsp; := <span style="color: #ff0000;">""</span><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> !Empty<span style="color: #000000;">&#40;</span> dDate1 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; cFilter &nbsp;:= <span style="color: #ff0000;">"HIREDATE >= "</span> + TRANSFORM<span style="color: #000000;">&#40;</span> DTOS<span style="color: #000000;">&#40;</span> dDate1 <span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"@R {^ 9999/99/99}"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> !Empty<span style="color: #000000;">&#40;</span> dDate2 <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> !Empty<span style="color: #000000;">&#40;</span> cFilter <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cFilter &nbsp;+= <span style="color: #ff0000;">" .AND. "</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; cFilter &nbsp;+= <span style="color: #ff0000;">"HIREDATE <= "</span> + TRANSFORM<span style="color: #000000;">&#40;</span> DTOS<span style="color: #000000;">&#40;</span> dDate2 <span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"@R {^ 9999/99/99}"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;? cFilter<br />&nbsp;</div>[/code:34t6rpx2]
:Setfilter from a defined substring ?
Tested and works perfect <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> all types of vars for the filtering are covered now and I can finish the job [img:1h3mlush]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Filter5&#46;jpg[/img:1h3mlush] thank You very much regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
:ToExcel() method error
Hi all, I'm having a problem using the oBrw:ToExcel() method after upgrading my old 2010 FW to the current version. It seems it is a valtype problem, all runs well with the old fwh 2010 version. See image. Any ideas ? [img:av1mcy89]http&#58;//www&#46;softwarexp&#46;co&#46;uk/beta/image&#46;png[/img:av1mcy89]
:ToExcel() method error
how are you doing? [code=fw:1neaifay]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oHoja:<span style="color: #000000;">Cells</span><span style="color: #000000;">&#40;</span>nX,nColuna<span style="color: #000000;">&#41;</span>:<span style="color: #000000;">set</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"NumberFormat"</span>,<span style="color: #ff0000;">"0,00"</span><span style="color: #000000;">&#41;</span><br />oHoja:<span style="color: #000000;">Cells</span><span style="color: #000000;">&#40;</span>nX,nColuna<span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := transform<span style="color: #000000;">&#40;</span>aDados<span style="color: #000000;">&#91;</span>nFor<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>,<span style="color: #ff0000;">"@E 999,999.99"</span><span style="color: #000000;">&#41;</span><br />oHoja:<span style="color: #000000;">Cells</span><span style="color: #000000;">&#40;</span>nX,nColuna<span style="color: #000000;">&#41;</span>:<span style="color: #000000;">set</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"NumberFormat"</span>,<span style="color: #ff0000;">"DD-MM-AAAA"</span><span style="color: #000000;">&#41;</span><br />oHoja:<span style="color: #000000;">Cells</span><span style="color: #000000;">&#40;</span>nX,nColuna<span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Value</span> := dtoc<span style="color: #000000;">&#40;</span>aDados<span style="color: #000000;">&#91;</span>nFor<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><br />oHoja:<span style="color: #000000;">Cells</span><span style="color: #000000;">&#40;</span>nX,nColuna<span style="color: #000000;">&#41;</span>:<span style="color: #000000;">set</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"NumberFormat"</span>,<span style="color: #ff0000;">"@"</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:1neaifay] [url:1neaifay]http&#58;//www&#46;44342&#46;com/xharbour-f1105-t2226-p1&#46;htm[/url:1neaifay]
:ToExcel() method error
This way ADD COLUMN oCol TO XBROWSE aObjects[6] DATA ARRAY ELEM aBrwDetails[i,3]; HEADER oemtoansi(aBrwDetails[i,1]) SIZE aBrwDetails[i,2] ORDER ABRWDETAILS[I,3] if valtype(aBrwArray[1,aBrwDetails[i,3]])="D" && if date xxxx:=aBrwDetails[i,3] oCol:bStrData:={||dtoc(aObjects[6]:aRow[xxxx])} endif
:bBmpData at TXBrowse Cols!
Hi again my friends.. I need a little help! This a example of my code: [code:i5s0vodx] &#46;&#46;&#46; oBrw&#58;aCols&#91;7&#93;&#58;addResource&#40; "IMAGE_TRUE" &#41; oBrw&#58;aCols&#91;7&#93;&#58;addResource&#40; "IMAGE_FALSE" &#41; oBrw&#58;aCols&#91;7&#93;&#58;bStrData &#58;= NIL oBrw&#58;aCols&#91;7&#93;&#58;nDataStrAlign &#58;= AL_CENTER oBrw&#58;aCols&#91;7&#93;&#58;bBmpData &#58;= &#123;|| if&#40; &#40; cAlias &#41;->situacao, 1, 2 &#41; &#125; &#46;&#46;&#46; [/code:i5s0vodx] When the ( cAlias )->situacao is true, the xBrowse displays the image at position 1 of correct way. But, when is false... it's not displays the image at position 2. Where I'm wrong?
:bBmpData at TXBrowse Cols!
Mr JC There is nothing wrong with your code. ( By the way it is not necessary to assign any value to nDataStrAlign in this case. When bStrData is nil, Bmp is shown centered. ). Please check if your RC file contains resource with the exact spelling IMAGE_FALSE. If the browse does not find a resource with the given name, it shows blank. You can also check this if oBrw:aCols[7]:addResource( "IMAGE_FALSE" ) is true or false. It it is true, the browse could successfully load the resource. If it is false, the browse could not load the resource.
:bBmpData at TXBrowse Cols!
[quote="nageswaragunupudi":zc1up1yv]Mr JC There is nothing wrong with your code. ( By the way it is not necessary to assign any value to nDataStrAlign in this case. When bStrData is nil, Bmp is shown centered. ). Please check if your RC file contains resource with the exact spelling IMAGE_FALSE. If the browse does not find a resource with the given name, it shows blank. You can also check this if oBrw:aCols[7]:addResource( "IMAGE_FALSE" ) is true or false. It it is true, the browse could successfully load the resource. If it is false, the browse could not load the resource.[/quote:zc1up1yv] Dear Nageswara.. After adjusting my code.... this her! [code:zc1up1yv] oBrw&#58;aCols&#91;7&#93;&#58;bStrData &#58;= NIL oBrw&#58;aCols&#91;7&#93;&#58;addResource&#40; "IMAGE_TRUE" &#41; <- this is the true position with a correctly resource name oBrw&#58;aCols&#91;7&#93;&#58;addResource&#40; "IMAGE_FALSE" &#41;<- this is the false position with a correctly resource name oBrw&#58;aCols&#91;7&#93;&#58;bBmpData &#58;= &#123;|| if&#40; &#40; cAlias &#41;->situacao, 1, 2 &#41; &#125; [/code:zc1up1yv] However, still an error <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> I'm testing passing the code block with the value 1 or 2... it's displays both images! So, the resource name is correctly!
:bBmpData at TXBrowse Cols!
Surprising. It works in the sample testxbr3.prg and also in my regular programs. Will you please try this alternative code ? oBrw:aCols[7]:bEditValue := { || (cAlias)->situacao } oBrw:aCols[7]:SetCheck( { "IMAGE_TRUE", "IMAGE_FALSE" } ) in the place of all the lines you have coded ?
:bBmpData at TXBrowse Cols!
[quote="nageswaragunupudi":3826com9]Surprising. It works in the sample testxbr3.prg and also in my regular programs. Will you please try this alternative code ? oBrw:aCols[7]:bEditValue := { || (cAlias)->situacao } oBrw:aCols[7]:SetCheck( { "IMAGE_TRUE", "IMAGE_FALSE" } ) in the place of all the lines you have coded ?[/quote:3826com9] Yes NageswaraRao.... I do try!
:bBmpData at TXBrowse Cols!
Ate the test, I get this error: Message not found: TXBRWCOLUMN:SETCHECK My version of fivewin don't have a method setCheck in the class TXBrwColumn!! <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
:bBmpData at TXBrowse Cols!
I am sorry. I should have seen the FWH version you are using. SetCheck is available from 8.03. Possible that in version 6 the bBmpData is not handled properly. I do not have source code of xbrowse.prg that version. May be we can examine how the paintdata method is dealing with bBmpData.
:bBmpData at TXBrowse Cols!
[quote="nageswaragunupudi":18ocx0o3]I am sorry. I should have seen the FWH version you are using. SetCheck is available from 8.03. Possible that in version 6 the bBmpData is not handled properly. I do not have source code of xbrowse.prg that version. May be we can examine how the paintdata method is dealing with bBmpData.[/quote:18ocx0o3] Yes! I will try to get the most updated version of fivewin Thanks very much Nageswara!!
:bPostKey y :Assing() en TGET.
Buenas, Estoy actualizando a FWH 8.02 desde la 7.04, y me encuentro que antes cuando se lanzaba :bPostKey el <!-- s:o --><img src="{SMILIES_PATH}/icon_surprised.gif" alt=":o" title="Surprised" /><!-- s:o -->Get:Buffer del GET estaba actualizado y ahora debo aplicar antes :Assing(). Además :bPostKey se lanzaba desde el método :KeyDown para las teclas VK_DELETE y VK_BACK y ahora en la nueva versión no es así. Estos comportamientos son correctos para esta nueva versión? Saludos Carlos G.
:bPostKey y :Assing() en TGET.
Carlos, Si, desde la versión 7.04 hasta la versión actual 8.03 se han ido realizando muchos cambios y mejoras, y aunque intentamos siempre mantener la máxima compatibilidad, a veces algunos pequeños cambios son requeridos en el código.
:bPostKey y :Assing() en TGET.
[quote="Antonio Linares":2z8q8aqi]Carlos, Si, desde la versión 7.04 hasta la versión actual 8.03 se han ido realizando muchos cambios y mejoras, y aunque intentamos siempre mantener la máxima compatibilidad, a veces algunos pequeños cambios son requeridos en el código.[/quote:2z8q8aqi] No hay problema, ahora he actualizado a la 8.03 y aplicaré las correcciones que necesito. Saludos y gracias. Carlos G.
:classname() no retorna ""TBAR"" ????
yo teno un Dialog con una TBAR, mas ao verificar con lo codigo: for i=1 to len(odlg:acontrols) ? odlg:acontrols[i]:classname() next En la Tbar no me mostra "TBAR" , aparece "BTNBMP" . Y en lo TBTNBMP nada me diz que é um Button de la Tbar, mas lo dato lBarBtn no assume .T. Pregunta: Como saber que un controle de lo dialog es la Tbar para redimensiona-la durante la execucion de lo programa? Saludos William
:classname() no retorna ""TBAR"" ????
otra cosita estrana, quando se usa la funcion getparent() en un btnbmp de una tbar, me retorna "TXBROWSE" y non "TBAR" como deveria de ser. Seria un BUG ? Saludos William
:classname() no retorna ""TBAR"" ????
William, el objeto TBar se almacena en oWnd:oBar. No se añade a oWnd:aControls, puesto que no debe tomar el foco.
:classname() no retorna ""TBAR"" ????
William, Para tu segunda pregunta, prueba asi: MsgInfo( GetParent( oBtnBmp:hWnd ) == oBar:hWnd ) siendo oBtnBmp un botón situado en oBar
:classname() no retorna ""TBAR"" ????
ok Antonio, voy a testar con isso. Muchas Gracias William
:end()
Hojeando el foro he visto que hay que hacer :end() de los objetos al salir de una funcion, incluso de los objetos Locales. ¿Es así? En el ejemplo de Carles hay cuatro objetos, oBmp, oDlg, oSay, oFont ¿por que solo con 2 de ellos se hace :end()? oBmp:End() oFont:End() ¿Hay alguna forma de ver que objetos hay en memoria? *---------------------- STATIC FUNCTION About() *---------------------- LOCAL oBmp, oDlg, oSay, oFont LOCAL cText := 'Ejemplo de uso de FWPPC' + CRLF + CRLF + ; '(c) Carles Aubia' DEFINE FONT oFont NAME 'Arial' SIZE 0, -10 DEFINE DIALOG oDlg RESOURCE "About" REDEFINE BITMAP oBmp NAME 'FWPPC' ID 200 OF oDlg REDEFINE SAY oSay PROMPT cText ID 210 OF oDlg ; FONT oFont COLOR CLR_BLACK, CLR_WHITE oDlg:blClicked := {|| oDlg:End() } oBmp:blClicked := {|| oDlg:End() } ACTIVATE DIALOG oDlg CENTERED oBmp:End() oFont:End() RETU NIL
:end()
Hola Jose, Realmente solo se tendria de aplicar el metodo End() al objeto oFont. oBmp ya lo destruye oDlg. Seguramente se quedo asi de las muchas pruebas q realize.
:end()
Ahora ya lo entiendo. Nunca había usado fivewin pero con vuestra ayuda es muy fácil de utilizar.
:end()
Jose, El método End() lo usamos para destruir determinados valores (handles) de Windows que precisan ser liberados, ó se consumen recursos del sistema, tales como handles de ventanas, recursos GDI (fonts, bitmaps, pens,etc), timers, etc.
:lAllowColSizing
I wish stop an xbrowse from final user I made WITH OBJECT oBrw :lHScroll := :lVScroll := .f. :nStretchCol := 1 :nFreeze := 1 :lAllowRowSizing := .F. :lColDividerComplete := .F. :lAllowColSwapping := .F. :lAllowColHiding := .F. :nMarqueeStyle := MARQSTYLE_NOMARQUEE :l2007 := .f. :l2015 := .t. :nColDividerStyle := LINESTYLE_NOLINES END the problem is the final user can also move and size the columns I tried with :lAllowColSizing := .F. but it seems no exist how I can resolve ?
:lAllowColSizing
oBrw:lAllowSizings := .f.
:lAllowColSizing
sorry then I found it but I not have it on my release but on wich release is it ?
:lAllowColSizing
sorry oBrw:lAllowSizings := .f. This is in all versions.
:nEditType := EDIT_GET ¿Disable?
Hola amigos, Tengo un xBrowse cuyo DATASOURCE es un Arreglo de Memoria. Defino una columna con la clausula EDIT_GET , lo que me permite editar al celda en tiempo de ejecucion. Bien, resulta que necesito mas adelante, que la misma columna sea Editable/NO editable, segun se cumpla una condicion. Algo asi como Disable(), Enable() y sin que pierda el valor que pueda contener al momento de cambiar a cualquiera de los dos estados ¿cual es la manera? he buscado en los post anteriores pero no he podido dar con la solucion.
:nEditType := EDIT_GET ¿Disable?
Prueba con: [code=fw:3fq43p0v]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bEditWhen</span> := <span style="color: #000000;">&#123;</span>|| tucondicion<span style="color: #000000;">&#125;</span> <br />&nbsp;</div>[/code:3fq43p0v]
:nEditType := EDIT_GET ¿Disable?
[quote="cmsoft":tmx1czna]Prueba con: [code=fw:tmx1czna]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bEditWhen</span> := <span style="color: #000000;">&#123;</span>|| tucondicion<span style="color: #000000;">&#125;</span> <br /> </div>[/code:tmx1czna][/quote:tmx1czna] Excelente César! Funcionó de 10 Gracias amigo !
:procLine - equivalente
Buenos dias Gente Compilando con xHarbour, capturo un error y describo, entre otros, el suceso informando con oError:procLine Al compilar con Harbour tal data no existe; cual es el equivalente?; ya que si uso ProcLine(), este sin pasarle parámetro numérico, me devuelve la linea de donde se llamo al Alert() del error y no precisamente donde ocurrió el error. gracias
:procLine - equivalente
[url:rid89srm]https&#58;//vivaclipper&#46;wordpress&#46;com/tag/procline/[/url:rid89srm] Saludos.
:procLine - equivalente
Karinha; muchas gracias Esto necesito: [quote:3b6y4n1v]Alert( "[Error nro: "+Str(oErr:GenCode,4,,TRUE)+"] - "+oErr:Description+CRLF+" - Línea: "+Str([b:3b6y4n1v]oErr:procLine[/b:3b6y4n1v],4,,TRUE); "EL Proceso de borrado se canceló" +CRLF+ ; "Verifique archivo:"+h0:cFileLog,,"Atención",,IDI_HAND )[/quote:3b6y4n1v] [b:3b6y4n1v]No ProcLine()[/b:3b6y4n1v], porque, en este caso, me devuelve la linea del Alert()
:procLine - equivalente
Como en este caso? [code=fw:3gt52gta]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">FUNCTION</span> ADOSHOWERROR<span style="color: #000000;">&#40;</span> oCn, cTable, lSilent <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//CHANGES BY BYTE-ONE</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nErr, oErr, cErr<br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> oCn <span style="color: #0000ff;">TO</span> oConnection<br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> lSilent <span style="color: #0000ff;">TO</span> .F.<br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> cTable <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">""</span><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> <span style="color: #000000;">&#40;</span> nErr := oCn:<span style="color: #000000;">Errors</span>:<span style="color: #0000ff;">Count</span> <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; oErr &nbsp;:= oCn:<span style="color: #000000;">Errors</span><span style="color: #000000;">&#40;</span> nErr - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> ! lSilent<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WITH OBJECT oErr<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cErr &nbsp; &nbsp; := <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> !EMPTY<span style="color: #000000;">&#40;</span> cTable <span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">'Table: '</span> + cTable +CRLF + CRLF ,<span style="color: #ff0000;">""</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cErr &nbsp; &nbsp; += oErr:<span style="color: #000000;">Description</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cErr &nbsp; &nbsp; += CRLF + <span style="color: #ff0000;">'Source : '</span> + oErr:<span style="color: #000000;">Source</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cErr &nbsp; &nbsp; += CRLF + <span style="color: #ff0000;">'NativeError : '</span> + cValToChar<span style="color: #000000;">&#40;</span> oErr:<span style="color: #000000;">NativeError</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cErr &nbsp; &nbsp; += CRLF + <span style="color: #ff0000;">'Error Source : '</span> + oErr:<span style="color: #000000;">Source</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cErr &nbsp; &nbsp; += CRLF + <span style="color: #ff0000;">'Sql State : '</span> + oErr:<span style="color: #000000;">SQLState</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cErr &nbsp; &nbsp; += CRLF + REPLICATE<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'-'</span>, <span style="color: #000000;">50</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cErr &nbsp; &nbsp; += CRLF + PROCNAME<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"( "</span> + cValToChar<span style="color: #000000;">&#40;</span> PROCLINE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" )"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cErr &nbsp; &nbsp; += CRLF + PROCNAME<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"( "</span> + cValToChar<span style="color: #000000;">&#40;</span> PROCLINE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" )"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cErr &nbsp; &nbsp; += CRLF + PROCNAME<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"( "</span> + cValToChar<span style="color: #000000;">&#40;</span> PROCLINE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" )"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cErr &nbsp; &nbsp; += CRLF + PROCNAME<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"( "</span> + cValToChar<span style="color: #000000;">&#40;</span> PROCLINE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" )"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cErr &nbsp; &nbsp; += CRLF + PROCNAME<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"( "</span> + cValToChar<span style="color: #000000;">&#40;</span> PROCLINE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" )"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cErr &nbsp; &nbsp; += CRLF + PROCNAME<span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"( "</span> + cValToChar<span style="color: #000000;">&#40;</span> PROCLINE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" )"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cErr &nbsp; &nbsp; += CRLF + PROCNAME<span style="color: #000000;">&#40;</span> <span style="color: #000000;">7</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"( "</span> + cValToChar<span style="color: #000000;">&#40;</span> PROCLINE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">7</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" )"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MSGALERT<span style="color: #000000;">&#40;</span> cErr, <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> oCn:<span style="color: #000000;">Provider</span> = <span style="color: #00C800;">NIL</span>, <span style="color: #ff0000;">"ADO ERROR"</span>,oCn:<span style="color: #000000;">Provider</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;END<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; MSGALERT<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ADO ERROR UNKNOWN"</span>+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CRLF + PROCNAME<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> &nbsp;+ <span style="color: #ff0000;">"( "</span> + cValToChar<span style="color: #000000;">&#40;</span> PROCLINE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" )"</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CRLF + PROCNAME<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> &nbsp;+ <span style="color: #ff0000;">"( "</span> + cValToChar<span style="color: #000000;">&#40;</span> PROCLINE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" )"</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CRLF + PROCNAME<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span> &nbsp;+ <span style="color: #ff0000;">"( "</span> + cValToChar<span style="color: #000000;">&#40;</span> PROCLINE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" )"</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CRLF + PROCNAME<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span> &nbsp;+ <span style="color: #ff0000;">"( "</span> + cValToChar<span style="color: #000000;">&#40;</span> PROCLINE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" )"</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CRLF + PROCNAME<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span> &nbsp;+ <span style="color: #ff0000;">"( "</span> + cValToChar<span style="color: #000000;">&#40;</span> PROCLINE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" )"</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CRLF + PROCNAME<span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span> &nbsp;+ <span style="color: #ff0000;">"( "</span> + cValToChar<span style="color: #000000;">&#40;</span> PROCLINE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" )"</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CRLF + PROCNAME<span style="color: #000000;">&#40;</span> <span style="color: #000000;">7</span> <span style="color: #000000;">&#41;</span> &nbsp;+ <span style="color: #ff0000;">"( "</span> + cValToChar<span style="color: #000000;">&#40;</span> PROCLINE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">7</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span> oErr<br />&nbsp;</div>[/code:3gt52gta]
:procLine - equivalente
Ó [code=fw:s5meyhz9]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #00C800;">FUNCTION</span> CheckErr <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; <span style="color: #00C800;">LOCAL</span> nLoc, oError<br /><br />&nbsp; <span style="color: #00C800;">TRY</span><br />&nbsp; &nbsp; nLoc := <span style="color: #ff0000;">"error"</span>/<span style="color: #000000;">2</span><br />&nbsp; CATCH oError<br />&nbsp; &nbsp; <span style="color: #0000ff;">msgInfo</span><span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">gencode</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">msgInfo</span><span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">SubSystem</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">msgInfo</span><span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">SubCode</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">msgInfo</span><span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">Operation</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">msgInfo</span><span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">Description</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #0000ff;">msgInfo</span><span style="color: #000000;">&#40;</span> valToPrg<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">Args</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; quit<br />&nbsp; END<br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #000000;">&#40;</span>nLoc<span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:s5meyhz9]
:procLine - equivalente
karinha Por favor, compila este sample con xHarbour y verifica: oError:Procline Luego compila con xharbour y verifica ProcLine() Los valores de linea son distintos (o estoy haciendo algo mal?) gracias [code=fw:cl64kelk]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br />Procedure Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> oError, ;<br />      x, ;<br />      nTotal<br /><br />   <span style="color: #00C800;">TRY</span><br />      nTotal:= x * <span style="color: #000000;">100</span><br /><br />   CATCH oError<br />#ifdef __XHARBOUR__<br />      Alert<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Error nro: "</span> + cValToChar<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">GenCode</span><span style="color: #000000;">&#41;</span> + CRLF + ;<br />             <span style="color: #ff0000;">"SubC: "</span> + cValToChar<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">SubCode</span> <span style="color: #000000;">&#41;</span> + CRLF + <span style="color: #ff0000;">"OSCode: "</span> + cValToChar<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">OsCode</span> <span style="color: #000000;">&#41;</span> + CRLF + ;<br />             <span style="color: #ff0000;">"SubSystem: "</span> + cValToChar<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">SubSystem</span> <span style="color: #000000;">&#41;</span> + CRLF + <span style="color: #ff0000;">"Mensaje: "</span> + oError:<span style="color: #000000;">Description</span> + CRLF + ;<br />             <span style="color: #ff0000;">"Linea: "</span> +cValToChar<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">procLine</span> <span style="color: #000000;">&#41;</span>,,<span style="color: #ff0000;">"Atención"</span> <span style="color: #000000;">&#41;</span><br /><br />#else <span style="color: #B900B9;">// __HARBOUR__</span><br />      Alert<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Error nro: "</span> + cValToChar<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">GenCode</span><span style="color: #000000;">&#41;</span> + CRLF + ;<br />             <span style="color: #ff0000;">"SubC: "</span> + cValToChar<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">SubCode</span> <span style="color: #000000;">&#41;</span> + CRLF + <span style="color: #ff0000;">"OSCode: "</span> + cValToChar<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">OsCode</span> <span style="color: #000000;">&#41;</span> + CRLF + ;<br />             <span style="color: #ff0000;">"SubSystem: "</span> + cValToChar<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">SubSystem</span> <span style="color: #000000;">&#41;</span> + CRLF + <span style="color: #ff0000;">"Mensaje: "</span> + oError:<span style="color: #000000;">Description</span> + CRLF + ;<br />             <span style="color: #ff0000;">"Linea: "</span> +cValToChar<span style="color: #000000;">&#40;</span> ProcLine<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,,<span style="color: #ff0000;">"Atención"</span> <span style="color: #000000;">&#41;</span><br />#endif<br />   END<br /><br /><span style="color: #B900B9;">// Fin</span></div>[/code:cl64kelk]
:procLine - equivalente
Holá, acá funciona bién com harbour y xharbour con FWHX16.10 [code=fw:25bcj9wd]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"error.ch"</span><br /><br />Procedure Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oError, x, nTotal<br /><br />   <span style="color: #00C800;">TRY</span><br /><br />      nTotal := x * <span style="color: #000000;">100</span><br /><br />   CATCH oError<br /><br />   #ifdef __XHARBOUR__<br /><br />      Alert<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Error nro: "</span> + cValToChar<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">GenCode</span><span style="color: #000000;">&#41;</span> + CRLF + ;<br />             <span style="color: #ff0000;">"SubC: "</span> + cValToChar<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">SubCode</span> <span style="color: #000000;">&#41;</span> + CRLF + <span style="color: #ff0000;">"OSCode: "</span> + cValToChar<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">OsCode</span> <span style="color: #000000;">&#41;</span> + CRLF + ;<br />             <span style="color: #ff0000;">"SubSystem: "</span> + cValToChar<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">SubSystem</span> <span style="color: #000000;">&#41;</span> + CRLF + <span style="color: #ff0000;">"Mensaje: "</span> + oError:<span style="color: #000000;">Description</span> + CRLF + ;<br />             <span style="color: #ff0000;">"Linea: "</span> +cValToChar<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">procLine</span> <span style="color: #000000;">&#41;</span>,,<span style="color: #ff0000;">"Atención"</span> <span style="color: #000000;">&#41;</span><br /><br />   #else <span style="color: #B900B9;">// __HARBOUR__</span><br /><br />      Alert<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Error nro: "</span> + cValToChar<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">GenCode</span><span style="color: #000000;">&#41;</span> + CRLF + ;<br />             <span style="color: #ff0000;">"SubC: "</span> + cValToChar<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">SubCode</span> <span style="color: #000000;">&#41;</span> + CRLF + <span style="color: #ff0000;">"OSCode: "</span> + cValToChar<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">OsCode</span> <span style="color: #000000;">&#41;</span> + CRLF + ;<br />             <span style="color: #ff0000;">"SubSystem: "</span> + cValToChar<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">SubSystem</span> <span style="color: #000000;">&#41;</span> + CRLF + <span style="color: #ff0000;">"Mensaje: "</span> + oError:<span style="color: #000000;">Description</span> + CRLF + ;<br />             <span style="color: #ff0000;">"Linea: "</span> +cValToChar<span style="color: #000000;">&#40;</span> ProcLine<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,,<span style="color: #ff0000;">"Atención"</span> <span style="color: #000000;">&#41;</span><br /><br />   #endif<br /><br />   END<br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">Nil</span><br /><br /><span style="color: #B900B9;">// Fin</span><br /> </div>[/code:25bcj9wd]  Saludos.
:procLine - equivalente
Karinha BOM 2017!! muchas gracias por la ayuda! Disculpa que insista: Compilando con xharbour, oError:procLine devuelve el mismo numero de linea que compilando con harbour, ProcLine()? (compilando com xHarbour, oError:procLine retorna o mesmo número da linha que a compilando com Harbour, ProcLine()?)
:procLine - equivalente
Gracias, un ótimo 2017 para ti también! Con xHarbour: [img:juva7phl]http&#58;//i&#46;imgur&#46;com/W4jaqqw&#46;png[/img:juva7phl] Saludos.
:procLine - equivalente
Con Harbour: [img:3n5wobme]http&#58;//i&#46;imgur&#46;com/BRMHO1l&#46;png[/img:3n5wobme]
:procLine - equivalente
Karinha; oError:procLine devuelve [b:2csh3vs9]linea 10[/b:2csh3vs9] (que es correcto). Mientras que ProcLine() devuelve[b:2csh3vs9] linea 26[/b:2csh3vs9], que NO es correcto Que solución hay, si lo sabes, para Harbour?
:procLine - equivalente
[code=fw:2ihp1juo]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"error.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> oError, x, nTotal, nLoc<br /><br />&nbsp; <span style="color: #00C800;">TRY</span><br /><br />&nbsp; &nbsp; nLoc := <span style="color: #ff0000;">"error"</span> / <span style="color: #000000;">2</span><br /><br />&nbsp; CATCH oError &nbsp;<span style="color: #B900B9;">// Harbour and xHarbour retorna linea 26</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">msgInfo</span><span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">gencode</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">msgInfo</span><span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">SubSystem</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">msgInfo</span><span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">SubCode</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">msgInfo</span><span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">Operation</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">msgInfo</span><span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">Description</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">msgInfo</span><span style="color: #000000;">&#40;</span> valToPrg<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">Args</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> cValToChar<span style="color: #000000;">&#40;</span> procLine<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,, <span style="color: #ff0000;">"Atención"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; END<br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">// Fin</span><br />&nbsp;</div>[/code:2ihp1juo] 
:procLine - equivalente
Karinha; Tu ejemplo Indica error en Linea 26 y [b:1pe6dlon]NO en Linea 10[/b:1pe6dlon] (Se entiende?!) O sea ProcLine() NO esta devolviendo correctamente la línea de error; sino la línea donde se llama a ProcLine() [img:1pe6dlon]http&#58;//i795&#46;photobucket&#46;com/albums/yy237/MLimonG/PROCLINE&#46;png[/img:1pe6dlon]
:procLine - equivalente
se me ocurrió que podriamos "extender" la clase Error de Harbour para implementar el mensaje ProcLine() #include "c:\harbour\contrib\xhb\xhbcls.ch" ... EXTEND CLASS Error WITH MESSAGE ProcLine INLINE ProcLine() pero la clase Error de Harbour no lo permite. De hecho no permite crear una clase derivada de ella no se aún cual es la razón de esta limitación
:procLine - equivalente
El errorsys de FWH utiliza ProcLine() y funciona correctamente con Harbour y xHarbour Puedes probar el ejemplo samples\testerro.prg usando buildh.bat y buildx.bat y verás que ambos reportan el mismo número de línea
:procLine - equivalente
Con xHarbour, funciona. Con HARBOUR NO funcona. ??? [img:1xyrieaj]http&#58;//i&#46;imgur&#46;com/NZkGUkF&#46;png[/img:1xyrieaj] [code=fw:1xyrieaj]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"error.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> oError, x, nTotal, nLoc<br /><br />&nbsp; <span style="color: #00C800;">TRY</span><br /><br />&nbsp; &nbsp; nLoc := <span style="color: #ff0000;">"error"</span> / <span style="color: #000000;">2</span> &nbsp;<span style="color: #B900B9;">// linea 10</span><br /><br />&nbsp; CATCH oError &nbsp;<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">msgInfo</span><span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">gencode</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">msgInfo</span><span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">SubSystem</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">msgInfo</span><span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">SubCode</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">msgInfo</span><span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">Operation</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">msgInfo</span><span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">Description</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">msgInfo</span><span style="color: #000000;">&#40;</span> valToPrg<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">Args</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// Asi, con xHarbour funciona. Con Harbour NO funciona. ????</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> cValToChar<span style="color: #000000;">&#40;</span> oError:<span style="color: #000000;">procLine</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,, <span style="color: #ff0000;">"Linea del Error: 10"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; END<br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">// Fin</span><br />&nbsp;</div>[/code:1xyrieaj]  Saludos.
:procLine - equivalente
¿ Ha incluido vd. xHb.Lib ?
:procLine - equivalente
[code=fw:3bwt0xll]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// Testing Harbour ProcName() and ProcLine() -> Procname.prg de Harbour</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br />PROCEDURE Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;Two<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Two<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;Three<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Three<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;Four<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Four<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;Five<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Five<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> n := <span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">WHILE</span> ! Empty<span style="color: #000000;">&#40;</span> ProcName<span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ?? <span style="color: #ff0000;">"Called from: "</span>, ProcName<span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span>, ProcLine<span style="color: #000000;">&#40;</span> n++ <span style="color: #000000;">&#41;</span>, hb_eol<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDDO</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">// fin</span><br />&nbsp;</div>[/code:3bwt0xll] 
:procLine - equivalente
[quote="hmpaquito":2ndsoghh]¿ Ha incluido vd. xHb.Lib ?[/quote:2ndsoghh] [code=fw:2ndsoghh]<div class="fw" id="{CB}" style="font-family: monospace;"><br />echo %hdirl%\xhb.lib + >> b32.bc<br />&nbsp;</div>[/code:2ndsoghh] [img:2ndsoghh]http&#58;//i&#46;imgur&#46;com/8WHv9fa&#46;png[/img:2ndsoghh] Saludos.
:procLine - equivalente
[img:2pkiya0f]http&#58;//i&#46;imgur&#46;com/UEU7RGk&#46;png[/img:2pkiya0f] Resuelto con BEGIN... SEQUENCE... END. Que compilador(Harbour) complicado! xHarbour es bien mas facil. [code=fw:2pkiya0f]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// testing procline() con Harbour. Me gusta xHarbour. jejejejejeje.</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br />MEMVAR A, B<br /><br />PROCEDURE Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oError<br /><br />&nbsp; &nbsp;BEGIN SEQUENCE WITH <span style="color: #000000;">&#123;</span>| oError | oError:<span style="color: #000000;">Cargo</span> := <span style="color: #000000;">&#123;</span> ProcName<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>, &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ProcLine<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">Break</span><span style="color: #000000;">&#40;</span> oError <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; &nbsp; A=B &nbsp;<span style="color: #B900B9;">// linea del error: 15</span><br /><br />&nbsp; &nbsp;RECOVER USING oError<br /><br />&nbsp; &nbsp; &nbsp; ? oError:<span style="color: #000000;">Cargo</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #B900B9;">//Procname</span><br />&nbsp; &nbsp; &nbsp; ? oError:<span style="color: #000000;">Cargo</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #B900B9;">//Procline -> Retorna Correcto con BEGIN...</span><br /><br />&nbsp; &nbsp;END<br /><br /><span style="color: #00C800;">RETURN</span><br />&nbsp;</div>[/code:2pkiya0f] 
:procLine - equivalente
muy bien <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> La librería hbcplr.lib de Harbour es, en mi opinión, lo que le da la superioridad a Harbour sobre xHarbour, aunque en algunos casos, como este, efectivamente xHarbour sea más fácil. Esta librería contiene todo el compilador y el preprocesador, lo que permite compilar y ejecutar código desde el propio EXE y esto es la clave para construir un ERP.
:procLine - equivalente
Karinha, Antonio Muchas gracias por colocar o tempo na pesquisa muchas gracias por poner tiempo en la investigación Tendré que usar BEGIN... SEQUENCE... END <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
:procLine - equivalente
Gracias Master, no tengo ningún conocimiento sobre hbcplr.lib pués no uso Harbour aún. Podrias hablar más sobre la misma? Y en españa, que significa ERP? Gracias, saludos.
:procLine - equivalente
Mira aquí karinha [url:15e9ebam]https&#58;//es&#46;wikipedia&#46;org/wiki/Sistema_de_planificaci%C3%B3n_de_recursos_empresariales[/url:15e9ebam] Por cierto, Harbour está mucho mejor construido en todos los aspectos que xHarbour, no te quepa ni la menor duda. Te lo digo yo que he estado trasteando por las tripas de los dos. <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> <!-- s:evil: --><img src="{SMILIES_PATH}/icon_evil.gif" alt=":evil:" title="Evil or Very Mad" /><!-- s:evil: --> Además parece que xHarbour está un poquito dejado de la mano...
:procLine - equivalente
[quote="xmanuel":1as6gm7k]Mira aquí karinha [url:1as6gm7k]https&#58;//es&#46;wikipedia&#46;org/wiki/Sistema_de_planificaci%C3%B3n_de_recursos_empresariales[/url:1as6gm7k] Por cierto, Harbour está mucho mejor construido en todos los aspectos que xHarbour, no te quepa ni la menor duda. Te lo digo yo que he estado trasteando por las tripas de los dos. <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> <!-- s:evil: --><img src="{SMILIES_PATH}/icon_evil.gif" alt=":evil:" title="Evil or Very Mad" /><!-- s:evil: --> Además parece que xHarbour está un poquito dejado de la mano...[/quote:1as6gm7k] Gracias estimado xManuel. Saludos.
< CRLF > for Buttontext in Class < ButtonBMP > ?
Is it possible, to have a CRLF in Class ButtonBMP like =>> "Customer" + CRLF + "Info" same like in Buttonbar Office2007 ? Greetings from Germany U.König <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
< CRLF > for Buttontext in Class < ButtonBMP > ?
Ukoenig, Class TButtonBmp uses the standard painting of Windows buttons. It just adds the bitmap. So we need to find if there is a way to display CRLFs in a standard Windows button
< CRLF > for Buttontext in Class < ButtonBMP > ?
There was already a topic for this. But don't remember which. But i remember the advices like this: Open the .rc file with a text editor. At the end of a button definition just comma and the value 8192. After this you may write your button prompt in RWS with a "\r\n" for a newline or CRLF in your redefine statement of your prg code. hth, Detlef
<make> file to create dll ?
Good day. What is the <make> file to create a dll and accept apache to work with mod harbor, from the "C" or "PRG" files. regards
<make> file to create dll ?
[url:21tg77u1]https&#58;//github&#46;com/FiveTechSoft/mod_harbour[/url:21tg77u1] and [url:21tg77u1]https&#58;//github&#46;com/FiveTechSoft/harbour_for_modharbour[/url:21tg77u1] There you have all that you need to build mod_harbour
<offtopic> Necesito Programador en Guadalajara Jalisc
Hola a todos, por expansion del departamento de sistemas requiero de un programador con experiencia en (x)Harbour y FWH, que resida en la ciudad de Guadajalara, Jalisco, Mexico o sus alrededores, interesados por favor enviar curriculum a <!-- e --><a href="mailto:rubio.luisfernando@gmail.com">rubio.luisfernando@gmail.com</a><!-- e --> para cita y posteriores datos. De antemano agradezco su amable atencion Luis Fernando Rubio Rubio
================================================
This forum is now dedicated to "Visual FiveWin"
================================================
Este foro esta ahora dedicado a "Visual FiveWin"
>Colores por cada letra de un texto
Hola Amigos. Sera posible tener un texto con colores diferentes en cada letra?? Salu2 [img][url=http&#58;//www&#46;subirimagenes&#46;net/i/140809060949533781&#46;jpg:3i8gnwx1][IMG]http://sia1.subirimagenes.net/img/2014/08/09/mini_140809060949533781.jpg[/img][/url:3i8gnwx1][/img] [img][url=http&#58;//www&#46;subirimagenes&#46;net/i/140809060949533781&#46;jpg:3i8gnwx1][IMG]http://sia1.subirimagenes.net/img/2014/08/09/140809060949533781.jpg[/img][/url:3i8gnwx1][/img]
>Colores por cada letra de un texto
No es posible????
>Colores por cada letra de un texto
Willi: Me parece que no existe una función para tal efecto, se me ocurre que metas el texto en un array y ahí asignarle el color a cada letra. Solo una idea. Saludos
>Colores por cada letra de un texto
Hola. A ver si esto te vale. Un saludo #include "fivewin.ch" static oWnd function main() DEFINE WINDOW oWnd ACTIVATE WINDOW oWnd ON PAINT Pinta( hDC ) return nil function Pinta( hDC ) local nColor local nLeft := 10 local cTexto := "En un lugar de la mancha de cuyo nombre no quiero acordarme" local oFont local hFont local nLen := len( cTexto ) local cLetra, n DEFINE FONT oFont NAME "Segoe UI Light" SIZE 0, -18 hFont := SelectObject( hDC, oFont:hFont ) for n := 1 to nLen cLetra := substr( cTexto, n, 1 ) nColor := SetTextColor( hDC, nRandom( CLR_WHITE ) ) TextOut( hDC, 10, nLeft, cLetra ) SetTextColor( hDC, nColor ) nLeft += GetTextWidth( hDC, cLetra, oFont ) next SelectObject( hDC, hFont ) oFont:ENd() return nil
>Colores por cada letra de un texto
[url=http&#58;//imageshack&#46;com/f/iqOJitHdj:1j33ze6u][img:1j33ze6u]http&#58;//imagizer&#46;imageshack&#46;us/v2/280x200q90/674/OJitHd&#46;jpg[/img:1j33ze6u][/url:1j33ze6u]
>Colores por cada letra de un texto
Very good Paco. [code=fw:866v3xy8]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><span style="color: #00C800;">STATIC</span> oWnd<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: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">PAINT</span> Pinta<span style="color: #000000;">&#40;</span> hDC <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Pinta<span style="color: #000000;">&#40;</span> hDC <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nColor<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nLeft &nbsp;:= <span style="color: #000000;">80</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nRight := <span style="color: #000000;">220</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cTexto := <span style="color: #ff0000;">"AMBIENTE PAISAGISMO"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oFont<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> hFont<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nLen := len<span style="color: #000000;">&#40;</span> cTexto <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cLetra, n<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nResHoriz, nResVert<br /><br />&nbsp; &nbsp;nResHoriz := oWnd:<span style="color: #000000;">nHorzRes</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nResVert &nbsp;:= oWnd:<span style="color: #000000;">nVertRes</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// Necesito más sugerencias para resoluciones de video.</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// I need more suggestions for video resolutions.</span><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> nResHoriz = <span style="color: #000000;">1366</span> .AND. nResVert = <span style="color: #000000;">768</span><br /><br />&nbsp; &nbsp; &nbsp; nLeft &nbsp;:= <span style="color: #000000;">260</span><br />&nbsp; &nbsp; &nbsp; nRight := <span style="color: #000000;">230</span><br /><br />&nbsp; &nbsp;ELSEIF nResHoriz = <span style="color: #000000;">1360</span> .AND. nResVert = <span style="color: #000000;">768</span><br /><br />&nbsp; &nbsp; &nbsp; nLeft &nbsp;:= <span style="color: #000000;">210</span><br />&nbsp; &nbsp; &nbsp; nRight := <span style="color: #000000;">250</span><br /><br />&nbsp; &nbsp;ELSEIF nResHoriz = <span style="color: #000000;">1280</span> .AND. nResVert = <span style="color: #000000;">768</span><br /><br />&nbsp; &nbsp; &nbsp; nLeft &nbsp;:= <span style="color: #000000;">210</span><br />&nbsp; &nbsp; &nbsp; nRight := <span style="color: #000000;">250</span><br /><br />&nbsp; &nbsp;ELSEIF nResHoriz = <span style="color: #000000;">1280</span> .AND. nResVert = <span style="color: #000000;">720</span><br /><br />&nbsp; &nbsp; &nbsp; nLeft &nbsp;:= <span style="color: #000000;">200</span><br />&nbsp; &nbsp; &nbsp; nRight := <span style="color: #000000;">200</span><br /><br />&nbsp; &nbsp;ELSEIF nResHoriz = <span style="color: #000000;">1024</span> .AND. nResVert = <span style="color: #000000;">768</span> &nbsp;<span style="color: #B900B9;">// Minha Maquina</span><br /><br />&nbsp; &nbsp; &nbsp; nLeft &nbsp;:= &nbsp;<span style="color: #000000;">80</span><br />&nbsp; &nbsp; &nbsp; nRight := <span style="color: #000000;">220</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br /><br />&nbsp; &nbsp; &nbsp; nLeft &nbsp;:= &nbsp;<span style="color: #000000;">80</span><br />&nbsp; &nbsp; &nbsp; nRight := <span style="color: #000000;">220</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// DEFINE FONT oFont NAME "Segoe UI Light" SIZE 0, - 50</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Segoe UI Symbol"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, - <span style="color: #000000;">80</span><br /><br />&nbsp; &nbsp;hFont := SelectObject<span style="color: #000000;">&#40;</span> hDC, oFont:<span style="color: #000000;">hFont</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">FOR</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> nLen<br /><br />&nbsp; &nbsp; &nbsp; cLetra := <span style="color: #0000ff;">substr</span><span style="color: #000000;">&#40;</span> cTexto, n, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; nColor := SetTextColor<span style="color: #000000;">&#40;</span> hDC, nRandom<span style="color: #000000;">&#40;</span> CLR_HGREEN <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// COLORS.CH</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// TextOut( hDC, 10, nLeft, cLetra )</span><br />&nbsp; &nbsp; &nbsp; TextOut<span style="color: #000000;">&#40;</span> hDC, <span style="color: #000000;">325</span>, nLeft, cLetra <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; SetTextColor<span style="color: #000000;">&#40;</span> hDC, nColor <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; nLeft += GetTextWidth<span style="color: #000000;">&#40;</span> hDC, cLetra, oFont <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">NEXT</span><br /><br />&nbsp; &nbsp;SelectObject<span style="color: #000000;">&#40;</span> hDC, hFont <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oFont:<span style="color: #000000;">ENd</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp;</div>[/code:866v3xy8] Saludos.
? 235.1234/100 == 2.35
Hi, Harbour/Clipper: ? 235.1234/100 2.35 not 2.351234 Any express return 2 decimals . Mysql : select 235.1234/100 2.35123400 Regards! Shuming Wang
? 235.1234/100 == 2.35
ShumingWang Try the SET DECIMALS command .. see below for syntax .. Rick Lipkin SET DECIMALS Defines the number of decimal places for displaying numeric values on the screen. Syntax SET DECIMALS TO [<nDecimals>] Arguments <nDecimals> This is a numeric value specifying the number of decimal places for screen output of numbers. The default value is 2. If <nDecimals> is omitted, the number of decimal places is set to zero. Description SET DECIMALS defines the number of decimal places for the display of numbers in text-mode applications. Note that the command affects only the display and not the accuracy of calculations with numeric values. If a number has more decimal places than <nDecimal>, the number is rounded for display. Note: to activate a fixed number of decimal places for screen display, SET FIXED must be set to ON.
? 235.1234/100 == 2.35
// \SAMPLES\SHUMING2.PRG [code=fw:2bsjmdgd]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nRetDec := <span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp;SET FIXED <span style="color: #0000ff;">ON</span><br /><br />&nbsp; &nbsp;? <span style="color: #000000;">25141251</span> / <span style="color: #000000;">362</span><br /><br />&nbsp; &nbsp;SET DECIMALS <span style="color: #0000ff;">TO</span> <span style="color: #000000;">10</span><br /><br />&nbsp; &nbsp;? <span style="color: #000000;">214514.214</span> / <span style="color: #000000;">6325</span><br /><br />&nbsp; &nbsp;SET DECIMALS <span style="color: #0000ff;">TO</span> <span style="color: #000000;">4</span><br /><br />&nbsp; &nbsp;? <span style="color: #000000;">235.1234</span> / <span style="color: #000000;">100</span><br /><br />&nbsp; &nbsp;SET DECIMALS <span style="color: #0000ff;">TO</span> <span style="color: #000000;">2</span><br /><br />&nbsp; &nbsp;? <span style="color: #000000;">235.1234</span> / <span style="color: #000000;">100</span><br /><br />&nbsp; &nbsp;SET DECIMALS <span style="color: #0000ff;">TO</span> <span style="color: #000000;">2</span><br /><br />&nbsp; &nbsp;nRetDec := <span style="color: #000000;">235.1234</span><br /><br />&nbsp; &nbsp;? <span style="color: #0000ff;">ROUND</span><span style="color: #000000;">&#40;</span> nRetDec, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">100</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp;</div>[/code:2bsjmdgd] Regards.
? 235.1234/100 == 2.35
Thanks ! Shuming Wang
?TGET problem with FW_SetUnicode(.T.)
I have use FW_SETUNICODE(.T.) in the program. When I len() to check Length of variable and it show 3 but I cannot type anything. If I clear the text and type again; English : can type up to 3 charactors Thai : can type 1 charactor (I think TGET understand that is 3 bytes already, because of Unicode text) [code=fw:2fdzknm8]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> oDlg, oGet<br />   <span style="color: #00C800;">LOCAL</span> cCad := <span style="color: #ff0000;">"?? "</span> <span style="color: #B900B9;">// pad("Testing Gets",40)</span><br />   <span style="color: #00C800;">LOCAL</span> nNum := <span style="color: #000000;">0</span><br />   <span style="color: #00C800;">LOCAL</span> dDat := Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   Set century <span style="color: #0000ff;">On</span><br />   Set Date Ansi<br />   Set Date format <span style="color: #ff0000;">"mm/dd/yyyy"</span><br /><br />   SET _3DLOOK <span style="color: #0000ff;">ON</span><br /><br />   FW_SetUnicode<span style="color: #000000;">&#40;</span>.T.<span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;?len<span style="color: #000000;">&#40;</span>cCad<span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"TGet from "</span> + FWDESCRIPTION<br /><br />   @ <span style="color: #000000;">1</span>,    <span style="color: #000000;">2</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Text..:"</span> <span style="color: #0000ff;">OF</span> oDlg<br />   @ <span style="color: #000000;">1</span>,    <span style="color: #000000;">6</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> cCad <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">60</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">COLOR</span> <span style="color: #ff0000;">"W/G"</span><br />   @ <span style="color: #000000;">1.8</span>,  <span style="color: #000000;">2</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Number:"</span> <span style="color: #0000ff;">OF</span> oDlg<br />   @ <span style="color: #000000;">2</span>,    <span style="color: #000000;">6</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> nNum <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">60</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"9999999.99"</span><br />   @ <span style="color: #000000;">2.6</span>,  <span style="color: #000000;">2</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Date:"</span> <span style="color: #0000ff;">OF</span> oDlg<br />   @ <span style="color: #000000;">3</span>,    <span style="color: #000000;">6</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> dDat <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@E"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">60</span>, <span style="color: #000000;">10</span>  <span style="color: #B900B9;">// "@D"</span><br />   @ <span style="color: #000000;">3</span>,    <span style="color: #000000;">7</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Ok"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">30</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   @ <span style="color: #000000;">3</span>,   <span style="color: #000000;">16</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"&Cancel"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">30</span>, <span style="color: #000000;">12</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> CANCEL<br />   <br />   <span style="color: #B900B9;">// TGet():SetColorFocus( nRGB( 200, 120, 120 ) )</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//------------------------------------------------------------------------//</span><br /><br />procedure appsys <span style="color: #B900B9;">// XBase++ requirement</span><br /><span style="color: #00C800;">return</span><br /> </div>[/code:2fdzknm8]
?TGET problem with FW_SetUnicode(.T.)
I used FWH 1512 / xHarbour 1.2.3 (FW) / BCC7. I've changed TGET 2 place. It look better but there are not compatible case such as copy and paste. Do the current version 1604 fully support TGET on Unicode? [code=fw:zhlxwn31]<div class="fw" id="{CB}" style="font-family: monospace;">#ifdef UTFREVN<br /><br />   <span style="color: #00C800;">METHOD</span> SetText<span style="color: #000000;">&#40;</span> cText <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> <span style="color: #000000;">&#40;</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lUnicode</span> .and. ::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Type</span> == <span style="color: #ff0000;">'C'</span>, ;<br />                                    <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lPassword</span>, cText := Trim<span style="color: #000000;">&#40;</span> cText <span style="color: #000000;">&#41;</span>, ;  <br />                                    cText := FW_UTF8PADR<span style="color: #000000;">&#40;</span> cText, iif<span style="color: #000000;">&#40;</span>IsUtf8<span style="color: #000000;">&#40;</span> Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bSetGet</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,HB_UTF8LEN<span style="color: #000000;">&#40;</span> Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bSetGet</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,len<span style="color: #000000;">&#40;</span>Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bSetGet</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">/*Len( Eval( ::bSetGet ) ) */</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#41;</span>, ;<br />                                    SetWindowText<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, cText <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">METHOD</span> GetText<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">lUnicode</span> .and. ::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Type</span> == <span style="color: #ff0000;">'C'</span>, ;<br />                               FW_UTF8PADR<span style="color: #000000;">&#40;</span> GetWindowText<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span>, iif<span style="color: #000000;">&#40;</span>IsUtf8<span style="color: #000000;">&#40;</span> Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bSetGet</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>,HB_UTF8LEN<span style="color: #000000;">&#40;</span> Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bSetGet</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>,len<span style="color: #000000;">&#40;</span>Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bSetGet</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #B900B9;">/*Len( Eval( ::bSetGet )*/</span> <span style="color: #000000;">&#41;</span>, ;<br />                               GetWindowText<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />#endif<br /> </div>[/code:zhlxwn31] [code=fw:zhlxwn31]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> FW_UTF8PADR<span style="color: #000000;">&#40;</span> cText, nLen <span style="color: #000000;">&#41;</span><br />cText    := Trim<span style="color: #000000;">&#40;</span> cText <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">if</span> IsUtf8<span style="color: #000000;">&#40;</span> cText <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> HB_UTF8LEN<span style="color: #000000;">&#40;</span> cText <span style="color: #000000;">&#41;</span> > nLen<br />         cText    := HB_UTF8LEFT<span style="color: #000000;">&#40;</span> cText, HB_UTF8LEN<span style="color: #000000;">&#40;</span> cText <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">enddo</span><br />   <br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> PadR<span style="color: #000000;">&#40;</span> cText, LEN<span style="color: #000000;">&#40;</span>cText<span style="color: #000000;">&#41;</span> - HB_UTF8LEN<span style="color: #000000;">&#40;</span> cText <span style="color: #000000;">&#41;</span> + nLen <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">/*<br />function FW_UTF8PADR( cText, nLen )<br /><br />   cText    := Trim( cText )<br />   if IsUtf8( cText )<br />      do while Len( cText ) > nLen<br />         cText    := HB_UTF8LEFT( cText, HB_UTF8LEN( cText ) - 1 )<br />      enddo<br />   <br />   endif<br /><br />return PadR( cText, nLen )<br />*/</span><br /> </div>[/code:zhlxwn31] Thank you in advance.
?TGET problem with FW_SetUnicode(.T.)
Get restricts entry by number of bytes. You can enter as much unicode text as can fit into the number of bytes of the string.
?hange height of rows xBrowse
Hi all ! When changing the mouse the column width is a redistribution of the text in the cells for words. Is it possible to have synchronous change height of rows when you change the column width to the text in the cells is completely visible ?
?hange the color of a window fragment
Hi, I need to change the color of a rectangular window fragment. How can this be done ?
?hange the color of a window fragment
Please post a screenshot of what you need
?hange the color of a window fragment
An orange rectangle is drawn on the white window <!-- m --><a class="postlink" href="https://cloud.mail.ru/public/kdYk/61wg63nfX">https://cloud.mail.ru/public/kdYk/61wg63nfX</a><!-- m -->