X Roemer schrieb:
I use always the same mechanism to add radio buttons by code. Usually I
add one after one, directly after each other, and they get grouped
automatically. But this time I can choose more than one and the others
don't get disabled. (See screenshot)
I know, it's better to show some code, but it would be a bit too much,
as the creation of widgets is splitted into several steps.
My questions are:
- Is there a mechanism to group radio buttons by code instead of adding
them one directly after the other?
- Can someone guess, what else can go wrong?
There the last paragraph in section 'Option Buttons'
"To combine several option buttons in a group, you must position them
one after another in the activation sequence without any gaps
(Model.TabIndex property, described as Order in the dialog editor). If
the activation sequence is interrupted by another control element, then
OpenOffice.org automatically starts with a new control element group
that can be activated regardless of the first group of control elements."
So this is different from option buttons in forms, where grouping is
done by the name property.
I have tested, that you really get a grouping, when the TabIndex is
consecutive. That happens automatically, when you insert them in that order.
You can change the property 'Tab index' after you have inserted a
control, but that will change the other tab indexes too. You might want
to have a list of the wanted tab order when designing the dialog and
start changing at tab index 0.
You can set and change the property TabIndex as well inside your program
before executing the dialog. But unless you insert option buttons newly
(instead of setting visible) when running your program, I think, that
generating the dialog controls in the correct order while designing the
dialog is much easier.
To unsubscribe e-mail to: email@example.com
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
Impressum (Legal Info)
: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (MPLv2
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our trademark policy