Jump to content
Sign in to follow this  
monoceres

Help with editcontrol

Recommended Posts

monoceres

Hello I just have one small (or two) question about the edit controls.

Why is this code just working until I reach somewhere between 50 and 70 lines of text:

CODE

$mainedit = GUICtrlCreateEdit("",0,0,250,450, $ES_MULTILINE + $ES_WANTRETURN + $ES_READONLY)

; Lots of code

_GUICtrlEditScroll($mainedit, $SB_PAGEDOWN)

And what style should I define if I just want a vertical scroll on the control?


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites
Nahuel

Your code does work when it reaches somewhere between 50 and 70 lines of text. It's just that there are no scroll bars and if you are using GUIctrlSetData, it won't scroll down automatically so you won't see the text.

$mainedit = GUICtrlCreateEdit("", 0,0,250,450, BitOR($ES_READONLY,$ES_WANTRETURN,$WS_VSCROLL))
; Lots of code
_GUICtrlEditScroll($mainedit, $SB_PAGEDOWN)

A few recommendations:

  • Download Koda (from this forum). It will make that kind of things way easier.
  • If you are trying to set text in that edit control and then scroll down so you can see it, it will look really... rough when the text gets bigger and bigger. If that's what you are trying to do, then download the latest AutoIt beta and check out this function: _GUICtrlEdit_AppendText it will add data to the edit without removing previous content and will also scroll down. It looks reaaalll smooth.
good luck.

Share this post


Link to post
Share on other sites
monoceres

Thanks a lot I will look into it!


Broken link? PM me and I'll send you the file!

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.