Jump to content
Sign in to follow this  
avery

Moving to the bottom of a Scroll box or Edit Control

Recommended Posts

avery

Code:

$status = GUICtrlCreateEdit("", 168, 8, 425, 121, BitOR($ES_AUTOVSCROLL, $ES_READONLY, $ES_WANTRETURN, $WS_VSCROLL))
...
...
...
Func ss($line)
    $set_status = GUICtrlRead($status)
    $line = $set_status & $line
    GUICtrlSetData($status, $line & @CRLF)
EndFunc

Result:

I get a box but it doesn't scroll to the bottom of the edit box when I send it status with my ss() function. It stays at the top and new information (status as I put it) is appended to the end and you have to scroll down to see it.

I am not sure if I am missing a GUI control style (http://www.autoitscript.com/autoit3/docs/appendix/GUIStyles.htm#Edit) or if I just wrote broken code.

If anyone can help me out I'd greatly appreciate it.

Thanks,

Avery

Edited by avery

www.abox.orgAvery HowellVisit My AutoIt Websitehttp://www.abox.org

Share this post


Link to post
Share on other sites
isolation

You have to

Func ss($line)
    GUICtrlSetStyle ( $status,BitOR($ES_AUTOVSCROLL,  $ES_WANTRETURN, $WS_VSCROLL) )
    $set_status = GUICtrlRead($status)
    $line = $set_status & $line
    GUICtrlSetData($status, $line & @CRLF)
    GUICtrlSetStyle ( $status, BitOR($ES_AUTOVSCROLL, $ES_READONLY, $ES_WANTRETURN, $WS_VSCROLL))
EndFunc

try this...

Share this post


Link to post
Share on other sites
avery

You have to

Func ss($line)
    GUICtrlSetStyle ( $status,BitOR($ES_AUTOVSCROLL,  $ES_WANTRETURN, $WS_VSCROLL) )
    $set_status = GUICtrlRead($status)
    $line = $set_status & $line
    GUICtrlSetData($status, $line & @CRLF)
    GUICtrlSetStyle ( $status, BitOR($ES_AUTOVSCROLL, $ES_READONLY, $ES_WANTRETURN, $WS_VSCROLL))
EndFuncoÝ÷ ÚÚò¶¬þ«¨µâ-®'jwb¶ËbWhzËazƦzØb¦Þr&­{*.®Ø¦y©ÝiÛâqæ§t"Yz²È§ªèºwpØb´kçm¢Ì"µÈmê+uêè}«­¢+ØÀÌØí±¥¹ôÀÌØíÍÑ}ÍÑÑÕ̵ÀìÀÌØí±¥¹

and it just made it look weird.. Haven't figured it out yet lol. I am not sure why I'd need to continue to set the style repeatedly as it looks pretty redundant.

Thanks again.


www.abox.orgAvery HowellVisit My AutoIt Websitehttp://www.abox.org

Share this post


Link to post
Share on other sites
avery

I am starting to look at this problem from a different perspective. I am hoping to find a solution to this inconvenient user interface problem I'm experiencing as a result of my amateur coding skillz.

However I can't figure out what function I need or if it's possible. I am trying to just write the status text into the edit control the way it shows up now, scrolled all the way at the top.

I would like to somehow get the cursor inside the edit control and hit the ctrl+home key so it's at the bottom. I am not sure how flexible this solution is either.

This is not a shameless bump :\ Just desperate brainstorming and learning.

ADVthanksANCE

Edited by avery

www.abox.orgAvery HowellVisit My AutoIt Websitehttp://www.abox.org

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.