Jump to content
Sign in to follow this  
vonHerman

dynamically display WS_VSCROLL for CTRL EDIT

Recommended Posts

vonHerman

Hi all,

I just wanted to know if there is any way to detect overflow in EDITBOX and display vertical scroll only if needed?

I have the log box which is updated with new line for every application event and it is displayed with following styles:

GUICtrlCreateEdit("", 10, 50, 480, 200, BitOR($ES_WANTRETURN, $ES_MULTILINE, $ES_AUTOVSCROLL, $ES_READONLY, $WS_VSCROLL))

But I would really be happy if I could hide scrollbar gadget entirely when it's not needed.

--

Thank you

vonHerman

Share this post


Link to post
Share on other sites
MikahS

Using

_GUICtrlEdit_LineLength
to determine what the length by line using a for loop; also using
AdlibRegister("func", 250)
to run this func to get the length of the index after you find out how many lines you have using
_GUICtrlEdit_GetLine
should get you in the right direction. I'm not sure you can add scroll on the fly, but you can always get the text using
_GUICtrlEdit_GetText
then deleting the edit control and creating a new one with the text you got from your call to
_GUICtrlEdit_GetText
Hopefully this will give you a better idea of how this would work. :)

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites
MikahS

You would have to figure out the length of characters it takes to hit the end of the edit controls visible field, but that is easily tested will playing :)


Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

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  

×