Syed23 Posted February 28, 2012 Posted February 28, 2012 Hi All, Do we any function to read how many subitems are there under a column? like i have below example which is having 3 rows of data in a column. i want to read i many items are there in that column. any suggestion ? #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt('MustDeclareVars', 1) Example() Func Example() Local $listview, $button, $item1, $item2, $item3, $input1, $msg GUICreate("listview items", 220, 250, 100, 200, -1, $WS_EX_ACCEPTFILES) GUISetBkColor(0x00E0FFFF) ; will change background color $listview = GUICtrlCreateListView("col1 |col2|col3 ", 10, 10, 200, 150);,$LVS_SORTDESCENDING) $button = GUICtrlCreateButton("Value?", 75, 170, 70, 20) $item1 = GUICtrlCreateListViewItem("item2|col22|col23", $listview) $item2 = GUICtrlCreateListViewItem("item1|col12|col13", $listview) $item3 = GUICtrlCreateListViewItem("item3|col32|col33", $listview) $input1 = GUICtrlCreateInput("", 20, 200, 150) GUICtrlSetState(-1, $GUI_DROPACCEPTED) ; to allow drag and dropping GUISetState() GUICtrlSetData($item2, "ITEM1") GUICtrlSetData($item3, "||COL33") GUICtrlDelete($item1) Do $msg = GUIGetMsg() Select Case $msg = $button MsgBox(0, "listview item", GUICtrlRead(GUICtrlRead($listview)), 2) Case $msg = $listview MsgBox(0, "listview", "clicked=" & GUICtrlGetState($listview), 2) EndSelect Until $msg = $GUI_EVENT_CLOSE EndFunc ;==>Example Thank you,Regards,[font="Garamond"][size="4"]K.Syed Ibrahim.[/size][/font]
Syed23 Posted February 28, 2012 Author Posted February 28, 2012 sorry to disturb you all guys! i got on my own _GUICtrlListView_GetItemCount this function does the trick... Thank you,Regards,[font="Garamond"][size="4"]K.Syed Ibrahim.[/size][/font]
funkey Posted February 28, 2012 Posted February 28, 2012 _GUICtrlListView_GetItemCount _GUICtrlListView_GetColumnCount Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning.
Moderators Melba23 Posted February 28, 2012 Moderators Posted February 28, 2012 (edited) Syed23,Dog eaten your Help file? _GUICtrlListView_GetItemCount is what you want. M23Edit: Obviously not as you found it! Edited February 28, 2012 by Melba23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Syed23 Posted February 28, 2012 Author Posted February 28, 2012 yeah... i got myself and i updated the same above too.... Thank you,Regards,[font="Garamond"][size="4"]K.Syed Ibrahim.[/size][/font]
MPHillier Posted March 3, 2012 Posted March 3, 2012 Simple input into label example ;----------- $ListCount = _GUICtrlListView_GetItemCount($hListView) GUICtrlSetData($Count, "List Total: " & $ListCount) I Break and Fix things... If the surf is up I'm outta here.....
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now