Page 1 of 1

textbox and label

Posted: Thu Apr 10, 2025 5:31 pm
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.

Re: textbox and label

Posted: Fri Apr 11, 2025 1:44 am
by danielmaximiliano

Re: textbox and label

Posted: Sat Apr 12, 2025 3:15 pm
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.

Re: textbox and label

Posted: Tue Apr 15, 2025 11:05 am
by mol
you can search samples for resizing controls while resizing main window. But, generally it is a big problem to reach good effects

Re: textbox and label

Posted: Tue Apr 15, 2025 3:49 pm
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

Re: textbox and label

Posted: Tue Apr 15, 2025 4:12 pm
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

Re: textbox and label

Posted: Wed Apr 16, 2025 2:31 pm
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".

Re: textbox and label

Posted: Wed Apr 16, 2025 2:35 pm
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