Apache OpenOffice (AOO) Bugzilla – Issue 89307
UnGroup Control from its Label changes GetByIndex
Last modified: 2017-05-20 10:47:45 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. Thankyou Voo
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 http://www.openoffice.org/scdocs/ddIssues_EnterModify.html#priority). Targeting, grabbing, confirming.
Reset assigne to the default "issues@openoffice.apache.org".