Page 1 of 1

hOW TO DEFINE INPUTMASK

Posted: Thu Jan 28, 2010 9:17 am
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

Re: hOW TO DEFINE INPUTMASK

Posted: Thu Jan 28, 2010 9:47 am
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. :)

Re: hOW TO DEFINE INPUTMASK

Posted: Thu Jan 28, 2010 10:39 am
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!

Re: hOW TO DEFINE INPUTMASK

Posted: Thu Jan 28, 2010 1:51 pm
by Rathinagiri
Only now I had seen that the recent HMG reference is also not correct.

Re: hOW TO DEFINE INPUTMASK

Posted: Sat Jan 30, 2010 1:39 am
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

Re: hOW TO DEFINE INPUTMASK

Posted: Sat Jan 30, 2010 7:45 pm
by mol
Thanks, Fernando!