Jump to content
Sign in to follow this  
MattX

Text on GUICtrlCreateLabel getting cut off

Recommended Posts

MattX

Can anyone tell me how I get the " Choose the browser you wish to launch the Resources Page " to show correctly ? The 'Resources Page' is cut off !!

Its driving me nuts trying to work out how to get it back without removing the colour settings and font changes etc...

#include <GUIConstants.au3>

GUICreate("Resource Launcher - Matt Marsh, May 2005", 400, 100)
GUISetBkColor (0x6495ED)
GUICtrlCreateLabel("Choose the browser you wish to launch the Resources Page", 60, 10)
GUICtrlSetColor(-1,0xff0000) 
GUICtrlSetFont (-1, 9, 800, ) 
$iebutton = GUICtrlCreateButton("IE", 70, 50, 60)
$ffbutton = GUICtrlCreateButton("Firefox", 280, 50, 60)
GUISetState(@SW_SHOW)
while 1
  $bpress = GUIGetMsg()
  Select
    Case $bpress = $iebutton
      Run ( 'c:\Program Files\Internet Explorer\iexplore.exe r:\work_files\resources.htm' )
      exit
    Case $bpress = $ffbutton
      Run ( 'c:\Program Files\Mozilla Firefox v1\firefox.exe r:\work_files\resources.htm' )
      exit
     ExitLoop
  EndSelect
WEnd

Share this post


Link to post
Share on other sites
buzz44

GUICtrlCreateLabel ( "text", left, top [, width [, height [, style [, exStyle]]]] )

Currently you just had the left/top parametres and you were using the default width and height, which you found out... the height is to small. Look at the GUICtrlCreateLabel line and notice the differnece between mine and yours. I have set the height to 40 which displays it correctly :(.

#include <GUIConstants.au3>

GUICreate("Resource Launcher - Matt Marsh, May 2005", 400, 100)
GUISetBkColor (0x6495ED)
GUICtrlCreateLabel("Choose the browser you wish to launch the Resources Page", 60, 10, -1, 40)
GUICtrlSetColor(-1,0xff0000)
GUICtrlSetFont (-1, 9, 800, )
$iebutton = GUICtrlCreateButton("IE", 70, 50, 60)
$ffbutton = GUICtrlCreateButton("Firefox", 280, 50, 60)
GUISetState(@SW_SHOW)
while 1
  $bpress = GUIGetMsg()
  Select
    Case $bpress = $iebutton
      Run ( 'c:\Program Files\Internet Explorer\iexplore.exe r:\work_files\resources.htm' )
      exit
    Case $bpress = $ffbutton
      Run ( 'c:\Program Files\Mozilla Firefox v1\firefox.exe r:\work_files\resources.htm' )
      exit
     ExitLoop
  EndSelect
WEnd

qq

Share this post


Link to post
Share on other sites
MattX

Thanks very much - appreciate the quick responce.

All done and working now !!

GUICtrlCreateLabel ( "text", left, top [, width [, height [, style [, exStyle]]]] )

Currently you just had the left/top parametres and you were using the default width and height, which you found out... the height is to small. Look at the GUICtrlCreateLabel line and notice the differnece between mine and yours. I have set the height to 40 which displays it correctly :(.

#include <GUIConstants.au3>

GUICreate("Resource Launcher - Matt Marsh, May 2005", 400, 100)
GUISetBkColor (0x6495ED)
GUICtrlCreateLabel("Choose the browser you wish to launch the Resources Page", 60, 10, -1, 40)
GUICtrlSetColor(-1,0xff0000)
GUICtrlSetFont (-1, 9, 800, )
$iebutton = GUICtrlCreateButton("IE", 70, 50, 60)
$ffbutton = GUICtrlCreateButton("Firefox", 280, 50, 60)
GUISetState(@SW_SHOW)
while 1
  $bpress = GUIGetMsg()
  Select
    Case $bpress = $iebutton
      Run ( 'c:\Program Files\Internet Explorer\iexplore.exe r:\work_files\resources.htm' )
      exit
    Case $bpress = $ffbutton
      Run ( 'c:\Program Files\Mozilla Firefox v1\firefox.exe r:\work_files\resources.htm' )
      exit
     ExitLoop
  EndSelect
WEnd

<{POST_SNAPBACK}>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×