How to create a button group in the toolbar?

This topic has been viewed 5738 times and has 1 replies
Thread status: Active
Questions about extending features and developing plug-ins [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
Post Reply New Topic
sputnik3000
Posts: 1
Joined: Thu Aug 04, 2016 2:16 pm
Country: Canada

How to create a button group in the toolbar?

Post by sputnik3000 »

I want to have a button group on the toolbar which can have one option be selected by the user between options A, B, C, and D. The toolbar button for the option would then be highlighted to show the user that this is the option he/she has chosen. This would be analogous to the radio buttons feature for Java Swing.

Ideally, it would be like the selection between the mouse controls in this section of the toolbar. I'm wondering if this is possible with only the plugin (no modifying the source code).

Image
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: How to create a button group in the toolbar?

Post by Puybaret »

The existing buttons you mentioned are instances of JToggleButton, but you can also use JRadioButton instances gathered with Group class.
It's feasible with a plugin but I wouldn't recommend it.
Emmanuel Puybaret, Sweet Home 3D creator
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 1 guest