Get right to leff

Post Reply
Wanderson
Posts: 332
Joined: Thu Nov 17, 2005 9:11 pm

Get right to leff

Post by Wanderson »

Hi,

How I can set get to show right to left? Like this:

01 Left RIGHT
02 (Default)
03
04 ___.___,__ ___.___,__
05 1__.___,__ ___.__1,__
06 12_.___,__ ___._12,__
07 123.___,__ ___.123,__
08 123.4__,__ __1.234,__
09 __1.234,__ __1.234,5_
10 __1.234,5_ __1.234,56
11 __1.234,56 __1.234,56

Thanks in advance!
User avatar
nageswaragunupudi
Posts: 10733
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 11 times
Contact:

Re: Get right to leff

Post by nageswaragunupudi »

Code: Select all | Expand

#include "fivewin.ch"function Main()   local oDlg, oGet, oFont   local nVar, cVar, cPic, nCent   SetGetColorFocus()   nVar        := 0   cPic        := "999,999,999,999" // Can have any number of decimals   nCent       := 10 ^ LEN( AFTERATNUM( ".", cPic ) )   cPic        += " "   cVar        := TRANSFORM( nVar, cPic )   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-16   DEFINE DIALOG oDlg SIZE 400,300 PIXEL TRUEPIXEL FONT oFont   @ 20,20 GET oGet VAR cVar SIZE 200,24 PIXEL OF oDlg RIGHT   WITH OBJECT oGet      :bGotFocus  := { || oGet:SetPos( Len( oGet:oGet:buffer ) ) }      :bKeyChar   := <|nKey,nFlags|         if nKey >= 0x30 .and. nKey <= 0x39            nVar        := nVar * 10 + ( nKey - 0x30 ) / nCent            oGet:cText  := Transform( nVar, cPic )            oGet:SetPos( Len( oGet:oGet:buffer ) )         endif         if nKey == VK_TAB .or. nKey == VK_RETURN            return nil         endif         return 0         >      :bKeyDown   := <|nKey,nFlags|         if nKey == VK_DELETE .or. nKey == VK_BACK            nVar        := Int( nVar * nCent / 10 ) / nCent            oGet:cText  := Transform( nVar, cPic )            oGet:SetPos( Len( oGet:oGet:buffer ) )            return 0         endif         return nil         >   END   @ 60,20 BUTTON "OK" SIZE 100,30 PIXEL OF oDlg ACTION MsgInfo( nVar )   ACTIVATE DIALOG oDlg CENTERED   RELEASE FONT oFontreturn nil 
Regards

G. N. Rao.
Hyderabad, India
wartiaga
Posts: 221
Joined: Wed May 25, 2016 1:04 am
Been thanked: 1 time

Re: Get right to leff

Post by wartiaga »

nageswaragunupudi wrote:

Code: Select all | Expand

#include "fivewin.ch"function Main()   local oDlg, oGet, oFont   local nVar, cVar, cPic, nCent   SetGetColorFocus()   nVar        := 0   cPic        := "999,999,999,999" // Can have any number of decimals   nCent       := 10 ^ LEN( AFTERATNUM( ".", cPic ) )   cPic        += " "   cVar        := TRANSFORM( nVar, cPic )   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-16   DEFINE DIALOG oDlg SIZE 400,300 PIXEL TRUEPIXEL FONT oFont   @ 20,20 GET oGet VAR cVar SIZE 200,24 PIXEL OF oDlg RIGHT   WITH OBJECT oGet      :bGotFocus  := { || oGet:SetPos( Len( oGet:oGet:buffer ) ) }      :bKeyChar   := <|nKey,nFlags|         if nKey >= 0x30 .and. nKey <= 0x39            nVar        := nVar * 10 + ( nKey - 0x30 ) / nCent            oGet:cText  := Transform( nVar, cPic )            oGet:SetPos( Len( oGet:oGet:buffer ) )         endif         if nKey == VK_TAB .or. nKey == VK_RETURN            return nil         endif         return 0         >      :bKeyDown   := <|nKey,nFlags|         if nKey == VK_DELETE .or. nKey == VK_BACK            nVar        := Int( nVar * nCent / 10 ) / nCent            oGet:cText  := Transform( nVar, cPic )            oGet:SetPos( Len( oGet:oGet:buffer ) )            return 0         endif         return nil         >   END   @ 60,20 BUTTON "OK" SIZE 100,30 PIXEL OF oDlg ACTION MsgInfo( nVar )   ACTIVATE DIALOG oDlg CENTERED   RELEASE FONT oFontreturn nil 


Thank you so much Mr. Nages, but this is the easiest way? So many gets to change.
User avatar
Rick Lipkin
Posts: 2678
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA
Been thanked: 2 times

Re: Get right to leff

Post by Rick Lipkin »

Rao

What are the < > markers .. should they be { codeblock .... }

Also ... If I need to trap arrow down and oRs:EOF with latest version on Fwh I can do something like :

Code: Select all | Expand

:bKeyChar   := {|nKey,nFlags|, if(nKey = VK_DOWN, If(oLbxB:bPastEof, _AddNewRow( ... ), ) )} 


Something like the above ?

Thanks
Rick Lipkin
User avatar
nageswaragunupudi
Posts: 10733
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 11 times
Contact:

Re: Get right to leff

Post by nageswaragunupudi »

but this is the easiest way? So many gets to change.

The easiest way is to use FWH 18.04.
Regards

G. N. Rao.
Hyderabad, India
wartiaga
Posts: 221
Joined: Wed May 25, 2016 1:04 am
Been thanked: 1 time

Re: Get right to leff

Post by wartiaga »

nageswaragunupudi wrote:
but this is the easiest way? So many gets to change.

The easiest way is to use FWH 18.04.


Hi Nages,

What kind of changes in fwh18.04 to make easy this implementation?
Thank you!
User avatar
nageswaragunupudi
Posts: 10733
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 11 times
Contact:

Re: Get right to leff

Post by nageswaragunupudi »

@ <r>, <c> GET <normal clauses> RIGHTTOLEFT <anymoreclauses>
Regards

G. N. Rao.
Hyderabad, India
wartiaga
Posts: 221
Joined: Wed May 25, 2016 1:04 am
Been thanked: 1 time

Re: Get right to leff

Post by wartiaga »

nageswaragunupudi wrote:@ <r>, <c> GET <normal clauses> RIGHTTOLEFT <anymoreclauses>


Great news! Thanks.
Post Reply