Jump to content
kylomas

GuiCtrlSetData Inconsistency?

Recommended Posts

kylomas

When I populate an edit control before GuiSetState() the data in the edit control is highlighted (selected?).  When I run GuiSetState() before populating the edit control the data is NOT highlighted.  Is this expected behavior?

#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Local $gui010 = GUICreate('Static CTL Example')
Local $edt010 = GUICtrlCreateEdit('', 10, 10, 380, 380, BitOR($ES_READONLY, $WS_VSCROLL))

GUISetState()

For $1 = 1 To 300
    GUICtrlSetData($edt010, 'Line  ' & StringFormat('%04i', $1) & @CRLF, 1)
Next

;GUISetState()

While 1

    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch

WEnd

kylomas

  • Like 1

Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Share this post


Link to post
Share on other sites
Danyfirex

I think is  expected. It happens to me in C# too.

 

Saludos

  • Like 1

Share this post


Link to post
Share on other sites
kylomas

Thx Danyfirex...


Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

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

×