Jump to content

I cant find my mistake


au3scr
 Share

Recommended Posts

Does someone know why my Edit control no longer accept enter key?As we all know if you press enter in edit control it should bring you to next line but in my source it's not happening.

How I can make enter work again?

I made my script more simple and added here:

#include <EditConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GuiEdit.au3>
#include <GuiConstantsEx.au3>

#Region ### START Koda GUI section ### Form=
$Form1_1 = GUICreate("title", @DesktopWidth * 0.8 , @DesktopHeight *0.8, 150, 120)
$Edit1 = GUICtrlCreateEdit("", 3, 19, @DesktopWidth * 0.8 - 3 , @DesktopHeight *0.8 -70,BitOR($ES_AUTOVSCROLL, $WS_VSCROLL, $ES_MULTILINE, $WS_HSCROLL, $ES_NOHIDESEL))


GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            If $nMsg[1]=$Form1_1 Then Exit
            GUIDelete($nMsg[1])
    EndSwitch
WEnd
Link to comment
Share on other sites

Does someone know why my Edit control no longer accept enter key?As we all know if you press enter in edit control it should bring you to next line but in my source it's not happening.

How I can make enter work again?

I made my script more simple and added here:

; ...<snip>

$Edit1 = GUICtrlCreateEdit("", 3, 19, @DesktopWidth * 0.8 - 3 , @DesktopHeight *0.8 -70, _
            BitOR($ES_AUTOVSCROLL, $WS_VSCROLL, $ES_MULTILINE, $WS_HSCROLL, $ES_NOHIDESEL))

; ...<snip>
Just add $ES_WANTRETURN to your styles for the control.

:)

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

well

$Form1_1 = GUICreate("title", @DesktopWidth * 0.8 , @DesktopHeight *0.8, 150, 120)
$Edit1 = GUICtrlCreateEdit("", 3, 19, @DesktopWidth * 0.8 - 3 , @DesktopHeight *0.8 -70,$WS_HSCROLL)
Also dont allow edit to accept enter

I tested that only

GUICtrlCreateEdit("", 3, 19, @DesktopWidth * 0.8 - 3 , @DesktopHeight *0.8 -70

Works but I need To use Styles and ExStyle(s)

and about 10 minutes ago my original source worked perfectly + no warnings at all.And I didnt change this part of my script.It seems like bug , but I am not sure.

Thanks PsaltyDS

Edited by au3scr
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...