Jump to content

Recommended Posts

Posted

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 ?

 

Posted

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  

Posted (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 by Allow2010
Posted

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.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...