cut off labels

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
t57042
Posts: 148
Joined: Tue Mar 16, 2010 9:46 am
Location: belgium

cut off labels

Post by t57042 »

The piece of code below displays 2 big labels.
Why is the lower part cut off?
Checked it on 2 different machines.
Richard

Code: Select all

#include "hmg.ch"

function Main()

	
	DEFINE WINDOW Win_1			;
	        AT        0,0 			;
	        WIDTH     700 			;
        	HEIGHT    520			;
	        TITLE     "ABC Accounting" 	;
        	MAIN 				;
		BACKCOLOR {0,0,102}
 	  DEFINE MAIN MENU OF Win_1
        		POPUP "&File"
                		
        	        	ITEM "&Exit"   ACTION Win_1.Release
		        END POPUP
		END MENU
 	     	   
      @ 113,243 LABEL Label_1 VALUE "ABC" TRANSPARENT FONT "ARIAL" SIZE 200 ;
         FONTCOLOR PINK  AUTOSIZE
 	    @ 413,143 LABEL Label_2 VALUE "Accounting" TRANSPARENT FONT "ARIAL" SIZE 120 ;
         FONTCOLOR WHITE  AUTOSIZE
	END WINDOW

  MAXIMIZE WINDOW Win_1
	ACTIVATE WINDOW Win_1

Return Nil
User avatar
gfilatov
Posts: 1116
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: cut off labels

Post by gfilatov »

t57042 wrote:The piece of code below displays 2 big labels.
Why is the lower part cut off?
Checked it on 2 different machines.
Richard,

Please try the following updated sample:

Code: Select all

#include "hmg.ch"

function Main()

   
   DEFINE WINDOW Win_1         ;
           AT        0,0          ;
           WIDTH     700          ;
           HEIGHT    520         ;
           TITLE     "ABC Accounting"    ;
           MAIN             ;
           BACKCOLOR {0,0,102}

     DEFINE MAIN MENU OF Win_1
              POPUP "&File"
                 ITEM "&Exit" ACTION Win_1.Release
              END POPUP
      END MENU
              
      @ 113,243 LABEL Label_1 VALUE "ABC" ;
         WIDTH 550 HEIGHT 250 ;
         TRANSPARENT FONT "ARIAL" SIZE 200 ;
         FONTCOLOR PINK

       @ 413,143 LABEL Label_2 VALUE "Accounting" ;
         WIDTH 900 HEIGHT 200 ;
         TRANSPARENT FONT "ARIAL" SIZE 120 ;
         FONTCOLOR WHITE

   END WINDOW

   MAXIMIZE WINDOW Win_1
   ACTIVATE WINDOW Win_1

Return Nil
BTW It seems that Autosize clause don't works with a such BIG label :o
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
t57042
Posts: 148
Joined: Tue Mar 16, 2010 9:46 am
Location: belgium

Re: cut off labels

Post by t57042 »

Thanks Grigory, I'm learning.
Richard
Post Reply