rajeshontheweb Posted April 2, 2009 Share Posted April 2, 2009 (edited) to put it in a easy way, i need a control just like the below window expandcollapse popupfirst line... 10 20 30 40 50 60 70 80 last line just like you would be able to scroll down to see the last line of the above code, i need to display a GUI with a readonly or disabled control which will display text with a scrollable readonly display . i have tried edit / input / label / etc label works well to resize on various lines of text but that doesnt serve my purpose. i tried to use the input & edit with multiline / readonly / disabled options but i cant get scroll bars to work when user wont be allowed to edit the control content.... Edited April 2, 2009 by rajeshontheweb Started late is much better than having never started it!!!!Failure is another step towards success. I've been messing around with: Adding Entry to 'Hosts'File Information Lister (Logger)Yet Another AutoIT Error Handler Yet Another AutoIT Error Handler & Debugger Control your App's TaskBar Button YCurrency Ticker (Latest Release : 16 Apr 2009)_WinInetInternetCheckConnection UDF Symantec Definitions Lister UDF _GetLocalIPAddresses UDF UDF to get Special Folder Information WMI_NetworkAdapterConfiguration2Array WMI_CDRomDriveCapabilities _ScriptExists - Check if your au3 script is running!! Uninstaller UDF Get Version for your application (at script level or compiled stage) Uninstaller Pro - faster alternative to windows application removal applet Link to comment Share on other sites More sharing options...
enaiman Posted April 2, 2009 Share Posted April 2, 2009 I don't know what have you tried but IMO it wasn't hard enough. This is easily done from Koda and it's "basic" stuff. #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 258, 214, 193, 125) GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close") $Edit1 = GUICtrlCreateEdit("", 8, 16, 241, 185, BitOR($ES_AUTOVSCROLL,$ES_READONLY,$ES_WANTRETURN,$WS_VSCROLL)) GUICtrlSetData(-1, "10"&@CRLF&@CRLF&@CRLF&"20"&@CRLF&@CRLF&@CRLF&"30"&@CRLF&@CRLF&@CRLF&"40"&@CRLF&@CRLF&@CRLF&"50"&@CRLF&@CRLF&@CRLF) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 Sleep(100) WEnd Func Form1Close() Exit EndFunc SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :) Link to comment Share on other sites More sharing options...
rajeshontheweb Posted April 4, 2009 Author Share Posted April 4, 2009 it did work for me initially, and i checked what i missed, it is actually the WS_AutoScroll. i dont want the whole window to have the scroll box, i need only this editcontrol to have it. anyway of doing it? check it out, in your code, if u just take out the WS_VSCroll, then its lost :-( Started late is much better than having never started it!!!!Failure is another step towards success. I've been messing around with: Adding Entry to 'Hosts'File Information Lister (Logger)Yet Another AutoIT Error Handler Yet Another AutoIT Error Handler & Debugger Control your App's TaskBar Button YCurrency Ticker (Latest Release : 16 Apr 2009)_WinInetInternetCheckConnection UDF Symantec Definitions Lister UDF _GetLocalIPAddresses UDF UDF to get Special Folder Information WMI_NetworkAdapterConfiguration2Array WMI_CDRomDriveCapabilities _ScriptExists - Check if your au3 script is running!! Uninstaller UDF Get Version for your application (at script level or compiled stage) Uninstaller Pro - faster alternative to windows application removal applet Link to comment Share on other sites More sharing options...
rajeshontheweb Posted April 4, 2009 Author Share Posted April 4, 2009 <edit> it does work , probably i need to tell AutoIT that the window needs to support Vertical scroll, only then the Edit control gets a scroll bar assigned :-) Started late is much better than having never started it!!!!Failure is another step towards success. I've been messing around with: Adding Entry to 'Hosts'File Information Lister (Logger)Yet Another AutoIT Error Handler Yet Another AutoIT Error Handler & Debugger Control your App's TaskBar Button YCurrency Ticker (Latest Release : 16 Apr 2009)_WinInetInternetCheckConnection UDF Symantec Definitions Lister UDF _GetLocalIPAddresses UDF UDF to get Special Folder Information WMI_NetworkAdapterConfiguration2Array WMI_CDRomDriveCapabilities _ScriptExists - Check if your au3 script is running!! Uninstaller UDF Get Version for your application (at script level or compiled stage) Uninstaller Pro - faster alternative to windows application removal applet Link to comment Share on other sites More sharing options...
martin Posted April 4, 2009 Share Posted April 4, 2009 <edit> it does work , probably i need to tell AutoIT that the window needs to support Vertical scroll, only then the Edit control gets a scroll bar assigned :-)Maybe you put the $WS_VSCROLL in the wrong place but the code enaiman posted doesn't need to be modified to work. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
rajeshontheweb Posted April 4, 2009 Author Share Posted April 4, 2009 BitOR($ES_AUTOVSCROLL,$ES_READONLY,$WS_VSCROLL,$WS_HSCROLL) this is what i used.. ( i dont need the wantreturn) Started late is much better than having never started it!!!!Failure is another step towards success. I've been messing around with: Adding Entry to 'Hosts'File Information Lister (Logger)Yet Another AutoIT Error Handler Yet Another AutoIT Error Handler & Debugger Control your App's TaskBar Button YCurrency Ticker (Latest Release : 16 Apr 2009)_WinInetInternetCheckConnection UDF Symantec Definitions Lister UDF _GetLocalIPAddresses UDF UDF to get Special Folder Information WMI_NetworkAdapterConfiguration2Array WMI_CDRomDriveCapabilities _ScriptExists - Check if your au3 script is running!! Uninstaller UDF Get Version for your application (at script level or compiled stage) Uninstaller Pro - faster alternative to windows application removal applet Link to comment Share on other sites More sharing options...
enaiman Posted April 5, 2009 Share Posted April 5, 2009 I really don't know what's your problem? How can you say: "probably i need to tell AutoIT that the window needs to support Vertical scroll, only then the Edit control gets a scroll bar assigned :-)"? This doesn't make any sense to me. The example I gave you works the same with/without $ES_WANTRETURN and the edit control has the vertical scroll bar (horizontal too if you add $WS_HSCROLL) And - $WS_VSCROLL is not a general setting; not all controls will have a scroll bar Have a look at this example - if you still continue with your babbles, don't try the code and you don't try to understand it I won't be answering to any of your posts ever. I want to help but when the person I try to help is stubborn, lazy and doesn't make sense I move the hell out of their way. #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 258, 244, 193, 125) GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close") $Edit1 = GUICtrlCreateEdit("", 8, 16, 241, 95, BitOR($ES_AUTOVSCROLL,$ES_READONLY,$WS_VSCROLL)) GUICtrlSetData(-1, "10"&@CRLF&@CRLF&@CRLF&"20"&@CRLF&@CRLF&@CRLF&"30"&@CRLF&@CRLF&@CRLF&"40"&@CRLF&@CRLF&@CRLF&"50"&@CRLF&@CRLF&@CRLF) $Edit2 = GUICtrlCreateEdit("", 8, 120, 241, 95, BitOR($ES_AUTOVSCROLL,$ES_READONLY)) GUICtrlSetData(-1, "10"&@CRLF&@CRLF&@CRLF&"20"&@CRLF&@CRLF&@CRLF&"30"&@CRLF&@CRLF&@CRLF&"40"&@CRLF&@CRLF&@CRLF&"50"&@CRLF&@CRLF&@CRLF) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 Sleep(100) WEnd Func Form1Close() Exit EndFunc Maybe I was harsh but I felt like you need a "wake-up call" P.S. - for future referrence: try to post some code: either a part of your original code which shows the problem, either some similar code (an example). SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :) Link to comment Share on other sites More sharing options...
rajeshontheweb Posted April 6, 2009 Author Share Posted April 6, 2009 did sorry a bit harsh but its all in the game. i know how tough it is when the student is stubborn but i wish i am not :-) probably i havent understood what i have said earlier, ok here it goes this is what i meant, pls explain what is happening in here. $Edit1 = GUICtrlCreateEdit("", 8, 16, 241, 185, BitOR($ES_AUTOVSCROLL,$ES_READONLY,$ES_WANTRETURN)) GUICtrlSetData(-1, "10"&@CRLF&@CRLF&@CRLF&"20"&@CRLF&@CRLF&@CRLF&"30"&@CRLF&@CRLF&@CRLF&"40"&@CRLF&@CRLF&@CRLF&"50"&@CRLF&@CRLF&@CRLF&"60"&@CRLF&@CRLF&@CRLF)oÝ÷ ÙÚ²{p¢¹ºÚ"µÍÌÍÑY]HHÕRPÝÜX]QY] ][ÝÉ][ÝËMKN K]Ô ÌÍÑT×ÐUUÕÐÔÓ ÌÍÑT×ÔPQÓK ÌÍÑT×ÕÐSUT ÌÍÕÔ×ÕØÜÛ JBÕRPÝÙ]]JLK ][ÝÌL ][ÝÉ[ÐÔ[ÐÔ[ÐÔ[É][ÝÌ ][ÝÉ[ÐÔ[ÐÔ[ÐÔ[É][ÝÌÌ ][ÝÉ[ÐÔ[ÐÔ[ÐÔ[É][ÝÍ ][ÝÉ[ÐÔ[ÐÔ[ÐÔ[É][ÝÍL ][ÝÉ[ÐÔ[ÐÔ[ÐÔ[É][ÝÍ ][ÝÉ[ÐÔ[ÐÔ[ÐÔ i meant to say that i had checked up the scroll constants for the edit control - ES_* but didnt notice there was something about WS_* which made my code work that is what i wanted to mean. i would be ready to learn anytime. yeah , i am lazy at times but pls dont mistake me i am not stubborn not to learn. i do not mean to hurt or argue, i just wanna learn hope posting this here doesnt go against rules thanks. Started late is much better than having never started it!!!!Failure is another step towards success. I've been messing around with: Adding Entry to 'Hosts'File Information Lister (Logger)Yet Another AutoIT Error Handler Yet Another AutoIT Error Handler & Debugger Control your App's TaskBar Button YCurrency Ticker (Latest Release : 16 Apr 2009)_WinInetInternetCheckConnection UDF Symantec Definitions Lister UDF _GetLocalIPAddresses UDF UDF to get Special Folder Information WMI_NetworkAdapterConfiguration2Array WMI_CDRomDriveCapabilities _ScriptExists - Check if your au3 script is running!! Uninstaller UDF Get Version for your application (at script level or compiled stage) Uninstaller Pro - faster alternative to windows application removal applet 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