Jump to content

Recommended Posts

Posted

Say, Ive got a ListView.

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("AForm1", 418, 210, 193, 115)
$ListView1 = GUICtrlCreateListView("Test|Test|Test", 0, 0, 417, 209, BitOR($LVS_REPORT,$LVS_EDITLABELS,$LVS_SINGLESEL,$LVS_SHOWSELALWAYS))
GUICtrlSendMsg($listview1, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_GRIDLINES, $LVS_EX_GRIDLINES)
GUICtrlSendMsg($listview1, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_FULLROWSELECT, $LVS_EX_FULLROWSELECT)
$ListView1_0 = GUICtrlCreateListViewItem("Test1|Test2|Test3", $ListView1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $ListView1_0
            MsgBox(0, "", GUICtrlRead($ListView1_0))
    EndSwitch
WEnd

Just say, I wanted to:

When I click, for example, Test3.

Then, I want it to be editable.

So, In short.

I click the text, And I can edit it.

# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Posted

How about:

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $ListView1_0
            $InputData = InputBox("AForm1", "Enter new data")
            If Not @error Then GUICtrlSetData($ListView1_0, $InputData)
    EndSwitch
WEnd

:whistle:

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
Posted (edited)

Not using an inputbox, I mean, When you double click the section, It turns into a section, where you can type.

Edited by AzKay
# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Posted

Nothing happens if I double click the cells. oo, Am I missing something here?

# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Posted

I just tryed the EXE, Nothing happens when I double click a cell. oo

# MY LOVE FOR YOU... IS LIKE A TRUCK- #

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
×
×
  • Create New...