Mat Posted April 18, 2009 Share Posted April 18, 2009 (edited) When I use these styles, it does scroll down, but shows no scroll bar. Is there a way to show the bar, or not? Thanks MDiesel Very sorry, found the answer in another post, stupid question...Thats what you get for posting early morning... Edited April 18, 2009 by mdiesel AutoIt Project Listing Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted April 18, 2009 Moderators Share Posted April 18, 2009 When I use these styles, it does scroll down, but shows no scroll bar.Is there a way to show the bar, or not?ThanksMDieselTry using $WS_HSCROLL and $WS_VSCROLL Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
BrettF Posted April 18, 2009 Share Posted April 18, 2009 On your GUI? Take a look at _GUIScrollBars_. Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Mat Posted April 18, 2009 Author Share Posted April 18, 2009 (edited) nah...Smoke_N got the same as I got, it was a very stupid question.but just out of interest, how would I make line numbers for something like that? I could use a label or another edit that has readonly attrib....but how do I sync them?This?http://www.autoitscript.com/forum/index.ph...hl=line+numbers Edited April 18, 2009 by mdiesel AutoIt Project Listing Link to comment Share on other sites More sharing options...
BrettF Posted April 18, 2009 Share Posted April 18, 2009 Maybe try something like whats been done here... Play around with that, and see how you go... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
ProgAndy Posted April 18, 2009 Share Posted April 18, 2009 I would create the line numbers this way: expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <GUIEdit.au3> #include <StaticConstants.au3> Local $myedit, $msg GUICreate("My GUI edit") ; will create a dialog box that when displayed is centered $Lines = GUICtrlCreateEdit(StringReplace("1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21",",",@CRLF), 10, 10, 30, 300,$ES_READONLY) GUICtrlSetState(-1,$GUI_DISABLE) $myedit = GUICtrlCreateEdit("First line" & @CRLF, 40, 10, 300, 300) GUIRegisterMsg($WM_COMMAND,"MY_WM_COMMAND") GUISetState() Send("{END}") ; will be append dont' forget 3rd parameter GUICtrlSetData($myedit, "Second line", 1) ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd GUIDelete() Func MY_WM_COMMAND($hWnd, $uMsg, $wParam, $lParam) Local $nID = BitAND($wParam,0xFFFF) Local $nNotification = BitShift($wParam,16) If $nNotification = $EN_VSCROLL And $nID = $myedit Then Local $Zahlen For $i = 1 To _GUICtrlEdit_GetLineCount($lParam)-1 $Zahlen &= $i & @CRLF Next GUICtrlSetData($Lines,$Zahlen) _GUICtrlEdit_LineScroll($Lines, 0, _GUICtrlEdit_GetFirstVisibleLine($lParam)) EndIf Return $GUI_RUNDEFMSG EndFunc *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
Mat Posted April 18, 2009 Author Share Posted April 18, 2009 (edited) LOL Brett, thats the exact one i found and posted...The only problem with that is its bi-directional, thats a functionality I don't need, it only needs 1 scroll bar. @Progandy thats exactly what I'm looking for, and its small too, unlike some of the ones i've been looking at! the register message thing...I've not used that before, but it includes other stuff I need too, so thanks again. Thanks 2 all, sorry for the stupid first question, wasn't thinking straight. MDiesel edit: changed code to this: CODE expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <GUIEdit.au3> #include <StaticConstants.au3> Local $myedit, $msg GUICreate("My GUI edit", -1, -1, 100, 100, $WS_SIZEBOX) ; will create a dialog box that when displayed is centered $Lines = GUICtrlCreateEdit(StringReplace("1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21",",",@CRLF), 10, 10, 30, 300,$ES_READONLY) GUICtrlSetState(-1,$GUI_DISABLE) GUICtrlSetResizing ($Lines, $GUI_DOCKWIDTH + $GUI_DOCKLEFT) $myedit = GUICtrlCreateEdit("First line" & @CRLF, 40, 10, 300, 300) GUICtrlSetResizing ($myedit, $GUI_DOCKLEFT + $GUI_DOCKRIGHT) GUIRegisterMsg($WM_COMMAND,"MY_WM_COMMAND") GUISetState() Send("{END}") ; will be append dont' forget 3rd parameter GUICtrlSetData($myedit, "Second line", 1) ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd GUIDelete() Func MY_WM_COMMAND($hWnd, $uMsg, $wParam, $lParam) Local $nID = BitAND($wParam,0xFFFF) Local $nNotification = BitShift($wParam,16) If $nNotification = $EN_VSCROLL And $nID = $myedit Then Local $Zahlen For $i = 1 To _GUICtrlEdit_GetLineCount($lParam)-1 $Zahlen &= $i & @CRLF Next GUICtrlSetData($Lines,$Zahlen) _GUICtrlEdit_LineScroll($Lines, 0, _GUICtrlEdit_GetFirstVisibleLine($lParam)) EndIf Return $GUI_RUNDEFMSG EndFunc Edited June 11, 2020 by Melba23 Added code tags AutoIt Project Listing 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