hOW TO DEFINE INPUTMASK

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
mol
Posts: 3825
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

hOW TO DEFINE INPUTMASK

Post by mol »

Hi!
I want to define numeric textbox, but I want to paste to definition my InputMask

I'm trying:

Code: Select all

		cMyFormat := "999 999.999"
		@ 30,250 TEXTBOX T_Ilosc ;
			Value 1 ;
			NUMERIC ;
			FONT "Arial" SIZE 9;
			WIDTH  120 HEIGHT 20;
			RIGHTALIGN ;
			INPUTMASK cMyFormat
but I can't compile it.
I've tried to use &cMyFormat
but it still causes errors.
I've tried with Format but witout good results, too.

Is it possible to change textbox' inputmask while application's running?

Marek
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: hOW TO DEFINE INPUTMASK

Post by Rathinagiri »

Hi Marek,

The problem is not in inputmask. It is in the order of parameters.

This is the syntax of @... textbox command

Code: Select all

@ <row>,<col> TEXTBOX <name>		;
		[ <dummy1: OF, PARENT> <parent> ] ;
                [ HEIGHT <height> ]		;
		[ WIDTH <w> ]			;
		[ FIELD <field> ]		;
		[ VALUE <value> ]		;
		[ < readonly: READONLY > ] 	;
		[ FONT <fontname> ]		;
		[ SIZE <fontsize> ]		;
		[ <bold : BOLD> ] ;
		[ <italic : ITALIC> ] ;
		[ <underline : UNDERLINE> ] ;
		[ <strikeout : STRIKEOUT> ] ;
		[ TOOLTIP <tooltip> ]		;
		[ BACKCOLOR <backcolor> ] ;
		[ FONTCOLOR <fontcolor> ] ;
		NUMERIC				;
		INPUTMASK <inputmask>		;
                [ FORMAT <format> ]		;
                [ ON CHANGE <change> ]		;
		[ ON GOTFOCUS <gotfocus> ]	;
		[ ON LOSTFOCUS <lostfocus> ]	;
                [ ON ENTER <enter> ]		;
                [ <RightAlign: RIGHTALIGN> ]    ;
		[ <invisible: INVISIBLE> ]	;
		[ <notabstop: NOTABSTOP> ]	;
		[ HELPID <helpid> ] 		
So, your code should be,

Code: Select all

      cMyFormat := "999 999.999"
      @ 30,250 TEXTBOX T_Ilosc ;
         HEIGHT 20;
         Value 1 ;
         WIDTH  120;
         FONT "Arial" SIZE 9;
         NUMERIC INPUTMASK cMyFormat;
         RIGHTALIGN
or simply you can use alternate syntax. :)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
mol
Posts: 3825
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: hOW TO DEFINE INPUTMASK

Post by mol »

Many thanks Rathi!
I'm using an old minigui.chm where only positioned syntax is described.
I forgot that the order of phrases counts.

Mainly, I'm using IDE for defining window, but changing of inputmask is not possible "on the fly" (am I wrong???).
One of my clients requests parametric INPUTMASK

So, once again, thanks
Best regards!
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: hOW TO DEFINE INPUTMASK

Post by Rathinagiri »

Only now I had seen that the recent HMG reference is also not correct.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
fchirico
Posts: 324
Joined: Sat Aug 23, 2008 11:27 pm
Location: Argentina

Re: hOW TO DEFINE INPUTMASK

Post by fchirico »

mol wrote:Hi!
I want to define numeric textbox, but I want to paste to definition my InputMask

I'm trying:

Code: Select all

		cMyFormat := "999 999.999"
		@ 30,250 TEXTBOX T_Ilosc ;
			Value 1 ;
			NUMERIC ;
			FONT "Arial" SIZE 9;
			WIDTH  120 HEIGHT 20;
			RIGHTALIGN ;
			INPUTMASK cMyFormat
but I can't compile it.
I've tried to use &cMyFormat
but it still causes errors.
I've tried with Format but witout good results, too.

Is it possible to change textbox' inputmask while application's running?

Marek
Marek:

This work ok...

cMyFormat := "999 999.999"
@ 30,250 TEXTBOX T_Ilosc ;
Value 1 ;
FONT "Arial" SIZE 9;
WIDTH 120 HEIGHT 20;
NUMERIC ;
INPUTMASK cMyFormat;
RIGHTALIGN
Saludos, Fernando Chirico.
Post Reply