ChrisL Posted September 28, 2005 Share Posted September 28, 2005 Hi..I am trying to make a window which displays some text, the text is read from an external file so I dont have to change the program if I want to change the text. It looks like a license agreement style box but just contains instructions.I used a label and made it white but I cant get it to scroll.Should I be using something different.. I basically just want it to show a scrollable text box..So far it looks like this expandcollapse popup#include <GuiConstants.au3> GuiCreate("Setup", 392, 323,(@DesktopWidth-392)/2, (@DesktopHeight-323)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS ) $Label_1 = GuiCtrlCreateLabel("" & @CRlf & "", 10, 10, 370, 270, $SS_SUNKEN ) GuiCtrlSetBkColor(-1, 0xFFFFFF) $file = FileOpen("test.txt", 0) $Write="" ; Check if file opened for reading OK If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf ; Read in lines of text until the EOF is reached While 1 $line = FileReadLine($file) $Write = $Write & @CRLF & $Line If @error = -1 Then ExitLoop ;MsgBox (0,"",$Line) Wend FileClose($file) GUICtrlSetData ( $Label_1, $Write ) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd ExitPlease point me in the right direction.ThanksChris [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
ChrisL Posted September 28, 2005 Author Share Posted September 28, 2005 Don't worry I think I've sussed it.. I am now using $Label_1 = GuiCtrlCreateEdit("" & @CRlf & "", 10, 10, 370, 270, $SS_SUNKEN + $WS_VSCROLL + $ES_READONLY ) [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now