Sign in to follow this  
Followers 0
Leucon

GUI List Control AutoScrolling and Text Wrapping

2 posts in this topic

#1 ·  Posted (edited)

Okay dokay - I've trawled the help files / internet but I'm not getting very far here...

I have a GUI for a program that I'm writing - and I have used the GUICtrlCreateList() control as a method for presenting progress of the program to the user. I'm using a BitOR to control the style of the List control - the code goes like this:

GUICreate("My Program",320,400, 200,200)

$progressbar1 = GUICtrlCreateProgress (10,50,300,20)

GUICtrlCreateLabel("Detailed output...", 10, 75, 300, 20)

$style = BitOR($WS_BORDER,$WS_VSCROLL)

$progresswin= GUICtrlCreateList($progress, 10, 95, 300, 200, $style)

GUICtrlSetColor(-1,32250); not working with Windows XP Style

$button = GUICtrlCreateButton ("Start Process",10,295,300,20)

There's two things I need to do:

- I need to 'wrap' the text so that output does not go off past the edge of the List control

- I need to 'autoscroll' the output so that as new lines of output are written, the progress remains visible to the user.

My problem is that I cannot see any styles / extended styles that I can apply to a list control that will make either of these things happen. My question should perhaps be - is this possible - and if not, is there a control I can use that would allow this behaviour?

Many thanks

Edited by Leucon

Share this post


Link to post
Share on other sites



Okay dokay - I've trawled the help files / internet but I'm not getting very far here...

I have a GUI for a program that I'm writing - and I have used the GUICtrlCreateList() control as a method for presenting progress of the program to the user. I'm using a BitOR to control the style of the List control - the code goes like this:

GUICreate("My Program",320,400, 200,200)

$progressbar1 = GUICtrlCreateProgress (10,50,300,20)

GUICtrlCreateLabel("Detailed output...", 10, 75, 300, 20)

$style = BitOR($WS_BORDER,$WS_VSCROLL)

$progresswin= GUICtrlCreateList($progress, 10, 95, 300, 200, $style)

GUICtrlSetColor(-1,32250); not working with Windows XP Style

$button = GUICtrlCreateButton ("Start Process",10,295,300,20)

There's two things I need to do:

- I need to 'wrap' the text so that output does not go off past the edge of the List control

- I need to 'autoscroll' the output so that as new lines of output are written, the progress remains visible to the user.

My problem is that I cannot see any styles / extended styles that I can apply to a list control that will make either of these things happen. My question should perhaps be - is this possible - and if not, is there a control I can use that would allow this behaviour?

Many thanks

Welcome to the forum. A list box does not wrap text like an edit control does, nor does it automatically scroll when new items are inserted. However, you can "scroll" the list box yourself when you add an item so that the last item added is visible.

AFAIK, the only way to mimic the behavior that you are after would be to use an edit control and a whole lot of code. IMO, probably not worth the effort for the minimal visual appeal it might have.


Auto3Lib: A library of over 1200 functions for AutoIt

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  
Followers 0