Issue 89307 - UnGroup Control from its Label changes GetByIndex
Summary: UnGroup Control from its Label changes GetByIndex
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOo 2.3.1
Hardware: All All
: P4 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2008-05-11 12:47 UTC by voobase
Modified: 2017-05-20 10:47 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description voobase 2008-05-11 12:47:00 UTC
When designing a form in a "writer" document, as is done in Base, it is
necessary to ungroup a control from its Label to get to the properties of the
control or to move one part on the page with respect to the other.

The action of ungrouping the control from its label causes both the objects to
fall to the bottom of the list of controls (as seen with the Form Navigator) and
as such changes the GetByIndex number required to access any controls in that
particular form. If you watch the Form Navigator whilst doing this you will see
it occur in front of your eyes.

The problem that occurs is the unwanted effect of disrupting the operation of
any Macros that need to use this method to access a controls properties. 

There is no workaround for this bug when it comes to using a "Groupbox" that
contains "Radio Buttons" as you are not able to use other methods to access the
properties of the radio buttons. To work correctly as a group they must all
exhibit the same name (ruling out GetByName).

This problem is an annoyance when constructing database forms that use macros
that obtain a control using GetByIndex. A macro needs to be repaired with the
new index numbers when ever an ungroup occurs of a control higher up the list
than the groupbox and radiobuttins.


Comment 1 Frank Schönheit 2008-05-11 21:29:35 UTC
Two comments:
1. Ctrl+Click onto a control selects only this control, even if it is part of a
group. This allows both to display its properties, and to move it on the page.
2. getByName is outruled, as you rightly said, for radio buttons. However, you
can still assign arbitrary values to the Tag property of the radio button, which
would allow you to uniquely identify a given radio button (with some more lines
of code, admittedly).

With those two workarounds in mind (well, only the second is a workaround, the
first one really is the expected solution), I change the priority to P4 (it
would never have been a P2, anyway - see

Targeting, grabbing, confirming.
Comment 2 Marcus 2017-05-20 10:47:45 UTC
Reset assigne to the default "".