textbox and label

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
franco
Posts: 877
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

textbox and label

Post by franco »

Is there a way to set textbox and label global at start of the program for the complete program
tos save setting each one. hmg3.44
Thanks in advance.
All The Best,
Franco
Canada
User avatar
danielmaximiliano
Posts: 2625
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: textbox and label

Post by danielmaximiliano »

*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
franco
Posts: 877
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

Re: textbox and label

Post by franco »

Thanks Daniel, I can`t figure it out from that post. But a new request.
When you grab the corner of a window and make it smaller or bigger, is there something in hmg 3.44 ansi that will resize all the contents
of the window as well as the window.
All The Best,
Franco
Canada
User avatar
mol
Posts: 3774
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: textbox and label

Post by mol »

you can search samples for resizing controls while resizing main window. But, generally it is a big problem to reach good effects
User avatar
serge_girard
Posts: 3309
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: textbox and label

Post by serge_girard »

the webview has some nice resize facility... maybe you can take a look at it:

https://www.hmgforum.com/viewtopic.php?p=71698#p71698

Serge
There's nothing you can do that can't be done...
franco
Posts: 877
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

Re: textbox and label

Post by franco »

Thanks for all thoughts.
I have a client that needed larger font size but our textbox has wasted space so I had to set the height of every
textbox and button and change line numbers thoughout my whole program. Seven windows all completly full screens.
He did not want to split any screens like adding an extra entry window. It took 3 days but I have finally finished.
Thanks again,
Franco
All The Best,
Franco
Canada
ASESORMIX
Posts: 216
Joined: Thu Oct 25, 2012 8:08 pm
Location: Bqto, Venezuela

Re: textbox and label

Post by ASESORMIX »

A quien pueda interesar, este ejemplo de código fuente:

Code: Select all

....
....
....
  @NROW+=005,000005 LABEL 	LABEL_POSLINEA	VALUE "" 	WIDTH 070 	HEIGHT 20 	FONT 'TAHOMA'	SIZE 10 BOLD CENTERALIGN BORDER
  @NROW+=000,UCW(3) BUTTONEX BUTTONEX_COTIZA	  CAPTION "Bajar Cotización" 			PICTURE P_IMGSYSTEM+"button6.bmp" 			FONT 'ARIAL' SIZE 12 BOLD WIDTH 160 HEIGHT 25 ACTION INCLUIR_COTIZACION()
  @NROW+=000,UCW(3) BUTTONEX BUTTONEX_SELINV CAPTION "[ F10 ] Catalogo Articulos"	PICTURE P_IMGSYSTEM+"IMG_ADICIONAR.bmp" 	FONT 'ARIAL' SIZE 12 BOLD WIDTH 240 HEIGHT 25 ACTION .T.  //_SELINFINV()
  @NROW+=000,UCW(3) LABEL 	LABEL_EXISTE		VALUE "E: " 	autosize 	HEIGHT 20 	FONT 'TAHOMA'	SIZE 10 BOLD CENTERALIGN 
  @NROW+=000,UCW(0) TEXTBOX 	TEXT__EXISTE		VALUE 0.000	WIDTH 100	HEIGHT 20 	FONT 'Arial' 	SIZE 10 BOLD READONLY NUMERIC INPUTMASK [9,999,999.999]
  @NROW+=000,UCW(3) LABEL 	LABEL_PESO 		VALUE "P: " 	autosize 	HEIGHT 20 	FONT 'TAHOMA' 	SIZE 10 BOLD CENTERALIGN 
  @NROW+=000,UCW(0) TEXTBOX 	TEXT__TOTPESO	VALUE 0.000 	WIDTH 120 	HEIGHT 20 	FONT 'Arial' 	SIZE 10 BOLD READONLY NUMERIC INPUTMASK [9,999,999.999] 
  @NROW+=025,000005 LABEL 	LABEL_COTIZA 	VALUE "C: " 	autosize 	HEIGHT 20 	FONT 'TAHOMA' 	SIZE 10 BOLD CENTERALIGN 
  @NROW+=000,UCW(0) TEXTBOX TEXT__COTIZA 		VALUE "" 	WIDTH 120 	HEIGHT 20   	FONT 'Arial' 	SIZE 10 BOLD READONLY 
  ....
  ....
  ....
 
  
FUNCTION UCW(_P1)
 LOCAL IDK
 LOCAL KON 
 LOCAL KOL  
 LOCAL KAN 
 FOR IDK := LEN( _HMG_aControlNames ) TO 1 STEP -1
  KON := _HMG_aControlNames[ IDK ]
  IF LEN(ALLTRIM(KON))>0
   KON := _HMG_aControlNames[ IDK ]
   EXIT
  ENDIF
 NEXT
 KOL := GETPROPERTY( THIS.NAME,KON,"COL") 
 KAN := GETPROPERTY( THIS.NAME,KON,"WIDTH")
RETURN(KOL+KAN+IF(PCOUNT()=1,_P1,0))
 
Observen el "autosize" y el espacio dejado despues de "E: " , "P: " y "C:"
Todo estos detalles han sido muy utiles para mi y de gran ayuda cuando debo cambiar las lineas y reubicar las lecturas de datos y sus "etiquetas".
ASESORMIX
Posts: 216
Joined: Thu Oct 25, 2012 8:08 pm
Location: Bqto, Venezuela

Re: textbox and label

Post by ASESORMIX »

En el ejemplo anterior, corrijo la primera linea del codigo fuente:

Code: Select all

@NROW:=005,000005 LABEL 	LABEL_POSLINEA	VALUE "" 	WIDTH 070 	HEIGHT 20 	FONT 'TAHOMA'	SIZE 10 BOLD CENTERALIGN BORDER
Post Reply