Jump to content

Text running on columns


myspacee
 Share

Recommended Posts

One more try

#Include <GUIConstants.au3>
#Include <EditConstants.au3>
#Include <WindowsConstants.au3>

local $gui010   =   GUICreate(@scriptfullpath,910,700)
local $col010   =   GUICtrlCreateedit('', 10, 30, 290, 600, $es_wantreturn)
local $col020   =   GUICtrlCreateedit('',310, 30, 290, 600, $es_wantreturn)
local $col030   =   GUICtrlCreateedit('',610, 30, 290, 600, $es_wantreturn)
local $lbl010   =   GUICtrlCreatelabel('',10, 650, 290, 30)
                    GUIRegisterMsg($WM_COMMAND, 'WM_COMMAND')
                    GUISetState()

Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE

Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam)

    local $ctrl = BitAND($wParam, 0xFFFF)
    local $nmsg = BitShift($wParam, 16)

    Switch $nmsg
        Case $EN_change
            ;
            ; This notification happens after every char.  Might be used to make sure that words are not split across columns.
            ;
        Case $EN_maxtext
            switch $ctrl
                ;
                ; the controls are hardcoded.  For greater flexibility put them in an array and use +/- navigation
                ;
                case $col010
                    guictrlsetstate($col020,$gui_focus)
                case $col020
                    guictrlsetstate($col030,$gui_focus)
                case $col030
                    guictrlsetdata($lbl010,'No More Room To Type')
            endswitch
    EndSwitch

    Return $GUI_RUNDEFMSG

EndFunc

* - style removed from label control

kylomas

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

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

×
×
  • Create New...