Sign in to follow this  
Followers 0
Ealric

Strange Edit Control Issue with latest version

3 posts in this topic

With an older version 3.2.8.x all the edit controls behave the way I want them to. If you click in the edit control box, the cursor focus is where you placed it. However, in 3.2.10.x when you click into any edit control, if existing text is present, it highlights "ALL" of the text. This causes problems for me and has forced me to code around the issue.

For instance, I'm working on a command building edit box that allows inserts to be placed into the edit control box and I also allow the user to edit manually, if need be. But, when I write anything to that control, if a user had previously clicked into that box, the control believes that everything was highlighted and therefore, the cursor is at the 0 character rather than say at the 255th character (end of line). This causes the read variable to be overwritten completely.

Also, I run a function that reads the character count of the edit control box 0/255 for instance and works in the script. So, due to this wierd behavior of the focus in edit controls highlighting all of the text, sometimes when you click into the edit control, you have to click multiple times for the highlighting to stop and for the mouse cursor focus to finally produce the desired result. Again, none of this occurs in the older 3.2.8.x versions and only happens in 3.2.10.x.

Is there a reason why this highlighting focus is present on GUI edit controls with 3.2.10.x? Or, is there a way to disable it?

I'll provide a snippet of the code I'm using to produce this issue:

Thanks,

Default Edit box is disabled and can be enabled through user activation. This was designed to protect the code from accidentally being deleted by the user:

Global $MACRO = GUICtrlCreateEdit("", 10, 480, 365, 100, $ES_AUTOVSCROLL + $WS_VSCROLL + $ES_MULTILINE + $ES_WANTRETURN)
GUICtrlSetBkColor($MACRO, 0x0000000)
GUICtrlSetColor($MACRO, $_font)
GUICtrlSetState($MACRO, $GUI_DISABLE)oÝ÷ Øw«{ljȦ¦Xçp®+^~éܶ*'"ë~ð®+b'^¶Êu«Z¶ayçbµÊ'¶º%jëh×6; || _write() function
; || _write sets the guictrlsetdata to the appropriate strings presented in the function argument chains
Func _write($var1)
    GUICtrlSetData($MACRO, $var1, $var1)
EndFunc   ;==>_write

The issue is like I stated above. If you click into the edit control box once it's enabled, it automatically highlights "all" of the text in that box with a single click of the mouse into the control. In older versions, clicking with the mouse into the control put the cursor at the end of the line. In the newer version it highlights all of the text and assumes the cursor is then at the 0 position. So, if anything is written to the control box once this occurs, it erases everything and overwrites it while in the older version it works as expected.

Again, I've found a way to work around this issue and so it's not affecting me but I want to know why it's happening so that I don't have to continue to use my work around.

A secondary issue is that if you run any type of function that counts the number of characters being written into the edit control box, when you click in the old version, it works fine but when you click into the newer version, you have to click sometimes 3 or 4 different times for the cursor to appear at the end of the line.

Thanks.


My Projects: [topic="89413"]GoogleHack Search[/topic], [topic="67095"]Swiss File Knife GUI[/topic], [topic="69072"]Mouse Location Pointer[/topic], [topic="86040"]Standard Deviation Calculator[/topic]

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

It will be fixed in 3.2.11.1

Yay... This is effecting me also. AutoIt rocks woo~

In the current build of 3.2.11.1 the whole edit box contents are still selected when the user clicks in it. Hopefully this functionality can either be changed to the old way or have some type of flag so it can go one way or the other.

Edited by duckling78

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