Allow2010 Posted December 28, 2018 Posted December 28, 2018 Hello, i need to find out how many elements are shown in a scrollbox. This is what the info tool gives me: >>>> Control <<<< Class: TScrollBox Instance: 1 ClassnameNN: TScrollBox1 Name: Advanced (Class): [CLASS:TScrollBox; INSTANCE:1] ID: 6822152 Text: Position: 95, 356 Size: 1734, 295 ControlClick Coords: 314, 154 Style: 0x56000000 ExStyle: 0x00010000 Handle: 0x00681908 I considered something like ControlCommand, but it seems there is no function for this. Can someone help me ?
BugFix Posted December 28, 2018 Posted December 28, 2018 I'm sure, you don't mean a scrollbox! Quote A scroll box is a portion of the scroll bar that helps indicate your location within a document, field, or window. You can also quickly scroll through a page by clicking and dragging the scroll box to where you want to go. May be, you mean a listbox? Best Regards BugFix
mikell Posted December 28, 2018 Posted December 28, 2018 I would try ControlGetHandle + _GUICtrlListBox_GetCount
Nine Posted December 28, 2018 Posted December 28, 2018 Normally a Scroll Box (like HTML ones) contains a long line of words that you can scroll up and down to see the whole content. Is this what you got ? “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Allow2010 Posted December 28, 2018 Author Posted December 28, 2018 (edited) 4 hours ago, mikell said: I would try ControlGetHandle + _GUICtrlListBox_GetCount OK, i tried that, i get the handle but getCount only returns 0. It seems to be something different then a ListBox. It is like a box that contains buttons. If there are too many buttons i can scroll the box so i can reach every button. Edited December 28, 2018 by Allow2010
Allow2010 Posted December 29, 2018 Author Posted December 29, 2018 i found a way that works for me. The tscrollbox1 contains elements named TEmployeeButton1 to TEmployeeButtonX. I can check if an element exists by ControlGetHandle("[CLASS:Panelname]", "", "[CLASSNN:TEmployeeButton" & $i & "]") I just count the elements that exist. Not beautiful, but works.
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