realbasic-nug
[Top] [All Lists]

Re: Which control am I

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Which control am I
From: Thomas Reed <tareed at bitjuggler dot com>
Date: Tue, 31 Aug 2004 08:28:24 -0400
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <20040831120701 dot 1961 dot qmail at web50905 dot mail dot yahoo dot com>
On Aug 31, 2004, at 8:07 AM, Bob Gordon wrote:

Is is possible to know what the index number of a
control is?

The index among all controls in the window? Not really, except to loop through all controls looking for it. If it's part of a control array, you can use the control's Index property, but that won't work for all controls in the window.

For example, given an arbitrary control, I wish to
hide or show the next five controls.

What does "the next five controls" mean? The five immediately below it? To the right of it? The front-to-back ordering? The latter is, I believe, the order of controls in the Window.Control array, though this is not documented (that I can find) and thus could be incorrect and could change at any time. It sounds like what you need is a control array, since that's the only way you can be guaranteed a certain order among the indices.

-Thomas

Personal web page: <http://homepage.mac.com/thomasareed/> My shareware: <http://www.bitjuggler.com/> Free REALbasic code: <http://www.bitjuggler.com/extra/>

There are 10 kinds of people in the world -- those who understand binary
numbers and those who don't.

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>