Jump to content

[HELP] Collecting subdata with "_GUI Ctrl Get ListView Item Text"


ufukkreis853
 Share

Recommended Posts

Hello, I need your help. There is a small problem that I cannot solve, although it may be simple for you. How can I add the $size variable each time and get the result to 100? Thnx for help . I cant speak english i use google translate , sorry for my bad english.
 
#include <GUIConstantsEx.au3>
#include <GuiListView.au3>

Example()

Func Example()
        Local $idListview
        GUICreate("try", 400, 300)
        $idListview = GUICtrlCreateListView("try|sub|", 2, 2, 394, 268)
        GUISetState(@SW_SHOW)
        For $i = 0 to 10
            _GUICtrlListView_AddItem($idListview, "try")
            _GUICtrlListView_AddSubItem($idListview, $i, "10", 1)
            $size = 0
            $size += _GUICtrlListView_GetItemText($idListview, $i, 1)
            $i += 0
        Next
            MsgBox("64", "info", $size)
            
        Do
            Until GUIGetMsg() = $GUI_EVENT_CLOSE
            GUIDelete()
EndFunc
Link to comment
Share on other sites

#include <GUIConstants.au3>
#include <GuiListView.au3>

Example()

Func Example()
  GUICreate("try", 400, 300)
  Local $idListview = GUICtrlCreateListView("try|sub|", 2, 2, 394, 268)
  GUISetState(@SW_SHOW)
  Local $size = 0
  For $i = 0 To 9
    _GUICtrlListView_AddItem($idListview, "try")
    _GUICtrlListView_AddSubItem($idListview, $i, "10", 1)
    $size += _GUICtrlListView_GetItemText($idListview, $i, 1)
  Next
  MsgBox("64", "info", $size)

  Do
  Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc   ;==>Example

You were close...

Link to comment
Share on other sites

When you translate with Google use the copy icon, so the size of the font is normal.

As for your question, I must not understand what you mean, because it is what we are doing, isn't it ?

Link to comment
Share on other sites

I didn't see this, you are great man thnx Nine!

23 hours ago, Nine said:
#include <GUIConstants.au3>
#include <GuiListView.au3>

Example()

Func Example()
  GUICreate("try", 400, 300)
  Local $idListview = GUICtrlCreateListView("try|sub|", 2, 2, 394, 268)
  GUISetState(@SW_SHOW)
  Local $size = 0
  For $i = 0 To 9
    _GUICtrlListView_AddItem($idListview, "try")
    _GUICtrlListView_AddSubItem($idListview, $i, "10", 1)
    $size += _GUICtrlListView_GetItemText($idListview, $i, 1)
  Next
  MsgBox("64", "info", $size)

  Do
  Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc   ;==>Example

You were close...

 

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...