Sign in to follow this  
Followers 0
AutoITChump

Disabling select in edit box

3 posts in this topic

Howdy all,

In a bit of a sticky wicket.

I'm trying to create a window that pops up in which I can update the text to show progress of installations.

I've created a GUI with an Edit control. It's a read-only control with vertical scroll bars. My problem is, the user is able to "select" text with the control. While this text is selected, and the control is updated via GUICtrlSetData, it overwrites the selected text.

Here is the function I've created. It first checks for the existence of the GUI, then creates it if it does not exist. (This will be used multiple times throughout the running of the main app.

Func StatusUpdate ($message)

If $gui_status = "" Then

$gui_status = GUICreate($title & " Install Status",392, $guiheight,(@DesktopWidth-392)/2, (@DesktopHeight-$guiheight)/2 , $WS_VISIBLE + $WS_CLIPSIBLINGS)

$status = GUICtrlCreateEdit("Install status:" & @CRLF,-1,-1,390,220,$ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY+$ES_NOHIDESEL)

GUISetState(@SW_SHOW)

Else

GUISetState(@SW_SHOW,$gui_status)

EndIf

If Not WinActive($title & " Install Status") Then

WinActivate($title & " Install Status")

EndIf

GUICtrlSetData($status, @crlf & $message,"1")

EndFunc

Thanks in advance for any assistance!!

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