The basic idea is to calculate the index value by subtracting the element position from the array position, and dividing by the element size.
Of course, the result depends on the array disposal (horizontal or vertical ?) and on the the visible of the label/caption and index display. Using the rounded max value should take care of that if the label is in its usual position.
Don't forget to take into account the array index value and you are nearly done : thinks are more complicated if there is an element gap... 😉
Message Edité par chilly charly le 12-18-2005 06:45 AM
Chilly Charly (aka CC)