Re: [Lazarus] Grouping radio buttons

2012-03-21 Thread Jürgen Hestermann

Salvatore Coppola schrieb:

Put them in varius GroupBoxes so you can use the groupbox caption to
logically(visual) differenziate each group of radiobuttons
As already discussed, this also means to abandon individual placing of 
the buttons.


I have now used one TRadioGroup and TRadioButton elements for the second 
group . But only the latter can be arranged free. If I need multiple 
groups of radio buttons only one can be put as I want. The other ones 
are pressed into the TRadioGroup arrangement (which is not bad, but 
sometimes you need more freedom).



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Grouping radio buttons

2012-03-21 Thread Salvatore Coppola
Off topic (maybe)
I often use for the matter TComboBox with Style:=csDropDownList ==
only one choise per list (drastic reduction of space consumption)
Salvatore

2012/3/21 Jürgen Hestermann juergen.hesterm...@gmx.de:
 Salvatore Coppola schrieb:

 Put them in varius GroupBoxes so you can use the groupbox caption to
 logically(visual) differenziate each group of radiobuttons

 As already discussed, this also means to abandon individual placing of the
 buttons.

 I have now used one TRadioGroup and TRadioButton elements for the second
 group . But only the latter can be arranged free. If I need multiple groups
 of radio buttons only one can be put as I want. The other ones are pressed
 into the TRadioGroup arrangement (which is not bad, but sometimes you need
 more freedom).



 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Grouping radio buttons

2012-03-20 Thread Jürgen Hestermann

Hans-Peter Diettrich schrieb:
I don't see how a user will recognize arbitrary radio button groups, 
with related buttons scattered across a form. Buttons in a panel or 
RadioGroupBox instead are naturally perceivable as related. Thus IMO 
the given model enforces a clearly structured GUI.
When writing arbitrary I did not mean to randomly scatter them over 
the window. There can be multiple columns of radio buttons with text 
between them or other arrangements. The same question could be asked 
about TRadioButtons in general: Why can i put them *anywhere* although 
they are correlated? No visible connection is needed in this case. But 
it's only one group. No way to divide them into multiple groups. I would 
have expected a simple group number property that lets me set the group 
of some radio buttons to 1 and others to 2.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Grouping radio buttons

2012-03-20 Thread Martin Schreiber
On Tuesday 20 March 2012 07:21:47 Jürgen Hestermann wrote:
 Hans-Peter Diettrich schrieb:
  I don't see how a user will recognize arbitrary radio button groups,
  with related buttons scattered across a form. Buttons in a panel or
  RadioGroupBox instead are naturally perceivable as related. Thus IMO
  the given model enforces a clearly structured GUI.

 When writing arbitrary I did not mean to randomly scatter them over
 the window. There can be multiple columns of radio buttons with text
 between them or other arrangements. The same question could be asked
 about TRadioButtons in general: Why can i put them *anywhere* although
 they are correlated? No visible connection is needed in this case. But
 it's only one group. No way to divide them into multiple groups. I would
 have expected a simple group number property that lets me set the group
 of some radio buttons to 1 and others to 2.

MSEgui TRadioButton equivalent (tbooleaneditradio) has an integer group 
property as well. A useful feature. 

Martin

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Grouping radio buttons

2012-03-20 Thread Graeme Geldenhuys
On 19 March 2012 22:15, Luiz Americo Pereira Camara luizmed@... wrote:

 Some time ago, i needed the same feature so implemented a
 TRadioButton.GroupIndex property where only the radio buttons with the same
 GroupIndex would be affected.


That is exactly how fpGUI does it too since the start. This seems much
more logical than being forced to embed them in a (unwanted) panel.

As Felipe mentioned, maybe the Custom Draw widgets can come (yet
again) to the rescue.


-- 
Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Grouping radio buttons

2012-03-20 Thread Hans-Peter Diettrich

Graeme Geldenhuys schrieb:

On 20 March 2012 03:34, Hans-Peter Diettrich DrDiettrich1@a wrote:

Buttons in a panel or RadioGroupBox instead are naturally perceivable as
related.



That is highly dependent on the UI layout. For a clean and uncluttered
look, panels don't help the cause much.


Most layout managers and widgetsets organize layouts in rectangles, 
docking managers do it the same way. This regular model is both a 
simple and stable approach, encouraging clean layouts at the same time. 
IMO it's the equivalent of structured code, for the GUI.



Having component free from
bounding panels, also allow for much more flexibly layout when things
are being resized by the end-user, dpi changes, themes changes,
dynamic content added at runtime (eg: help text inserted and pushing
component apart temporarily) etc...


All these issues can be handled nicely in a regular approach.


We don't live in boxes or grids
(hopefully smile), so why should our UI components.


Undisciplined or uneducated users prefer to write spaghetti code, and to 
hack together some irregular GUI or webpages. They are on their own when 
nobody wants to have a look at their code or applications, due to the 
lack of an obvious structure.


DoDi


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Grouping radio buttons

2012-03-20 Thread Jürgen Hestermann


Martin Schreiber schrieb:
 MSEgui TRadioButton equivalent (tbooleaneditradio) has an integer group
 property as well. A useful feature.

Nice to hear. I find this principle so apparent that I was a bit 
astonished that it was not implemented in TRadioButton as well. 
TRadioButton also allow an arbitrary placement of the buttons but why 
only 1 group?


Nevertheless, I now found a solution with TRadioGroup that solves my 
current problem with radio buttons.

Thanks for all the help.

In the end such problems are also often lack of knowledge. Too bad that 
I can't spent more time on experimenting with Lazarus. Mostly I have to 
just get it running while I would like much more to find the most 
elegant way. But that requires an excellent knowledge about all possible 
ways to implement something to pick the best.



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Grouping radio buttons

2012-03-20 Thread Salvatore Coppola
Put them in varius GroupBoxes so you can use the groupbox caption to
logically(visual) differenziate each group of radiobuttons

Salvatore

2012/3/19 Jürgen Hestermann juergen.hesterm...@gmx.de:
 I already searched for hours but cannot find anything useful.

 My question:
 Is it possible (and if yes, how) to group some radio buttons
 so that only one of each group can be selected?

 I put some radio buttons on my form which select different things
 but they are all connected with each other so that only one can be selected
 at a time.

 I expected some property defining a goup but I cannot find anything like
 that.


 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Grouping radio buttons

2012-03-19 Thread Mattias Gaertner
On Mon, 19 Mar 2012 17:51:48 +0100
Jürgen Hestermann juergen.hesterm...@gmx.de wrote:

 I already searched for hours but cannot find anything useful.
 
 My question:
 Is it possible (and if yes, how) to group some radio buttons
 so that only one of each group can be selected?
 
 I put some radio buttons on my form which select different things
 but they are all connected with each other so that only one can be 
 selected at a time.
 
 I expected some property defining a goup but I cannot find anything like 
 that.

Use a TRadioGroup or put the radiobuttons on a panel. 
Hint: A Panel can become invisible with BevelOuter=bvNone.

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Grouping radio buttons

2012-03-19 Thread Jürgen Hestermann

Mattias Gaertner schrieb:

 Is it possible (and if yes, how) to group some radio buttons
 so that only one of each group can be selected?

 Use a TRadioGroup or put the radiobuttons on a panel.
 Hint: A Panel can become invisible with BevelOuter=bvNone.

I already read a bit about TRadioGroup. But it seems that this restricts 
the physical location of the buttons on the form or am I wrong? I would 
like to be able to place the radio buttons at arbitrary places on the form.


A panel seems to be doable but it's still awkward. Now the locations of 
the radio buttons are located relative to the panel and I have to 
rearrange them all. I thought that there is some logical grouping that 
is independend from the visible location but it seems this does not exist.



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Grouping radio buttons

2012-03-19 Thread Mattias Gaertner
On Mon, 19 Mar 2012 18:14:20 +0100
Jürgen Hestermann juergen.hesterm...@gmx.de wrote:

 Mattias Gaertner schrieb:
  
   Is it possible (and if yes, how) to group some radio buttons
   so that only one of each group can be selected?
  
   Use a TRadioGroup or put the radiobuttons on a panel.
   Hint: A Panel can become invisible with BevelOuter=bvNone.
 
 I already read a bit about TRadioGroup. But it seems that this restricts 
 the physical location of the buttons on the form or am I wrong? I would 
 like to be able to place the radio buttons at arbitrary places on the form.
 
 A panel seems to be doable but it's still awkward. Now the locations of 
 the radio buttons are located relative to the panel and I have to 
 rearrange them all. I thought that there is some logical grouping that 
 is independend from the visible location but it seems this does not exist.

Well, placing them randomly would confuse users.

In a panel you can place the radiobuttons anywhere you want.


Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Grouping radio buttons

2012-03-19 Thread Luiz Americo Pereira Camara

On 19/3/2012 13:51, Jürgen Hestermann wrote:

I already searched for hours but cannot find anything useful.

My question:
Is it possible (and if yes, how) to group some radio buttons
so that only one of each group can be selected?

I put some radio buttons on my form which select different things
but they are all connected with each other so that only one can be 
selected at a time.


I expected some property defining a goup but I cannot find anything 
like that.


Some time ago, i needed the same feature so implemented a 
TRadioButton.GroupIndex property where only the radio buttons with the 
same GroupIndex would be affected.


In win32 worked fine but could not implement nor in gtk2 or qt due to 
how native radio buttons are designed in those widgetsets


So, your best bet is to use panel.

Luiz

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Grouping radio buttons

2012-03-19 Thread Felipe Monteiro de Carvalho
On Mon, Mar 19, 2012 at 9:15 PM, Luiz Americo Pereira Camara
luiz...@oi.com.br wrote:
 In win32 worked fine but could not implement nor in gtk2 or qt due to how
 native radio buttons are designed in those widgetsets

It should be implementable now in TCDRadioButton

-- 
Felipe Monteiro de Carvalho

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Grouping radio buttons

2012-03-19 Thread Hans-Peter Diettrich

Jürgen Hestermann schrieb:

A panel seems to be doable but it's still awkward. Now the locations of 
the radio buttons are located relative to the panel and I have to 
rearrange them all. I thought that there is some logical grouping that 
is independend from the visible location but it seems this does not exist.


The grouping model (by parent) originates in Windows and was not 
extended in Delphi. Logical groups would require additional data 
structures in a form (member arrays...), and could cause conflicts with 
e.g. Frames.


I don't see how a user will recognize arbitrary radio button groups, 
with related buttons scattered across a form. Buttons in a panel or 
RadioGroupBox instead are naturally perceivable as related. Thus IMO the 
given model enforces a clearly structured GUI.


DoDi


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus