format textbox, another

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
dragancesu
Posts: 921
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

format textbox, another

Post by dragancesu »

PRIVATE _iznos := 123.45
.
.
.
Win_1.dIznos.Value := _iznos
.
.
.

What's wrong in this line?

@ 80, 550 TEXTBOX dIznos HEIGHT 45 WIDTH 200 NUMERIC INPUTMASK "999,999.99" FONT "Arial" SIZE 20



I want to show some of the larger characters but fail, compilation error

I've tried many combinations but not
Carlos Britos
Posts: 245
Joined: Sat Aug 02, 2008 5:03 pm

Re: format textbox, another

Post by Carlos Britos »

Hi
Can you show us the compilation error and function involved ?
Regards/Saludos, Carlos (bcd12a)
User avatar
dragancesu
Posts: 921
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

Re: format textbox, another

Post by dragancesu »

Compilr error is

PROG1.PRG(322) Error E0030 Syntax error "syntax error at '@'"
Carlos Britos
Posts: 245
Joined: Sat Aug 02, 2008 5:03 pm

Re: format textbox, another

Post by Carlos Britos »

Try changing the order of definition

@ 80, 550 TEXTBOX dIznos HEIGHT 45 WIDTH 200 FONT "Arial" SIZE 20 NUMERIC INPUTMASK "999,999.99"
Regards/Saludos, Carlos (bcd12a)
User avatar
dragancesu
Posts: 921
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

Re: format textbox, another

Post by dragancesu »

I assumed that the problem is in the order of the fields, but in the manual it says

Code: Select all


      @ <nRow> ,<nCol> 
            TEXTBOX <ControlName> 
            [ OF | PARENT <ParentWindowName> ]
            [ HEIGHT <nHeight> ] 
            [ FIELD <FieldName> ]
            [ VALUE <nValue> ]
            [ READONLY ] 
            [ WIDTH <nWidth> ] 
            [ NUMERIC ] [ INPUTMASK <cMask> ] 
            [ FORMAT <cFormat> ] | PASSWORD ] 
            [ FONT <cFontName> SIZE <nFontSize> ]
            [ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
            [ TOOLTIP <cToolTipText> ]
            [ BACKCOLOR <aBackColor> ]
            [ FONTCOLOR <aFontColor> ]
            [ DISABLEDBACKCOLOR <aDisabledBackColor> ]
            [ DISABLEDFONTCOLOR <aDisabledFontColor> ]
            [ DATE ]
            [ MAXLENGTH <nInputLength> ]
            [ UPPERCASE | LOWERCASE ] 
            [ ON GOTFOCUS <OnGotFocusProcedur> | <bBlock> ]
            [ ON CHANGE <OnChangeProcedure> | <bBlock> ] 
            [ ON LOSTFOCUS <OnLostFocusProcedure> | <bBlock> ] 
            [ ON ENTER <OnEnterProcedure> | <bBlock> ] 
            [ RIGHTALIGN ]
            [ INVISIBLE ] 
            [ NOTABSTOP ]
            [ HELPID <nHelpId> ]

This writing in IDE help, any new?
Carlos Britos
Posts: 245
Joined: Sat Aug 02, 2008 5:03 pm

Re: format textbox, another

Post by Carlos Britos »

I don´t know why, but sometimes the harbour preprocessor needs to use the same order in which the command was defined

@ 80, 550 TEXTBOX dIznos HEIGHT 45 WIDTH 200 FONT "Arial" SIZE 20 NUMERIC INPUTMASK "999,999.99"

instead of

@ 80, 550 TEXTBOX dIznos HEIGHT 45 WIDTH 200 NUMERIC INPUTMASK "999,999.99" FONT "Arial" SIZE 20
Regards/Saludos, Carlos (bcd12a)
Javier Tovar
Posts: 1275
Joined: Tue Sep 03, 2013 4:22 am
Location: Tecámac, México

Re: format textbox, another

Post by Javier Tovar »

Hola dragancesu,

La lógica es esta:

PROCEDURE MAIN

PRIVATE _iznos := 123.45
.
.
.
DEFINE WINDOWS Win_1
.......ON INIT (Win_1.dIznos.Value := _iznos) //NO PUEDES ASIGNAR ANTES DE ACTIVAR EL FORM.
.
.
.

@ 80, 550 TEXTBOX dIznos HEIGHT 45 WIDTH 200 FONT "Arial" SIZE 20 NUMERIC INPUTMASK "999,999.99"

END WINDOW

RETURN NIL

Espero que te sirva,

Saludos


SALUDOS
Post Reply