View Issue Details

IDProjectCategoryView StatusLast Update
0021155LazarusWidgetsetpublic2012-01-28 11:57
ReporterReinier OlislagersAssigned ToFelipe Monteiro de Carvalho  
Status closedResolutionfixed 
Product Version0.9.31 (SVN) 
Fixed in Version0.9.31 (SVN) 
Summary0021155: Feature request: TRadioGroup: add OnSelectionChanged event
DescriptionTo find out if a user selected a different radiobutton in a TRadioGroup, you currently need to use the OnClick event. To me (and perhaps others) as a non-Delphi user, this is not immediately obvious.
In a forum thread, Felipe suggested adding an OnSelectionChanged event:,15840.msg85552.html#msg85552
TagsNo tags attached.
Fixed in Revision34957
WidgetsetGTK, GTK 2, Win32/Win64, WinCE, Carbon, Cocoa, QT, fpGUI, CustomDrawn
Attached Files


Bart Broersma

2012-01-26 18:38

developer   ~0056086

Why not simply calling it OnChange?

Zeljan Rikalo

2012-01-26 18:50

developer   ~0056087

Yes, I'm wondering why OnSelectionChange ? Why not OnItemChange(d) or simple OnChange() ?

Bart Broersma

2012-01-27 12:21

developer   ~0056106

I really think this event should be called OnChange.

Zeljan Rikalo

2012-01-27 13:39

developer   ~0056109

@Bart I'm not sure that it's good reason to reopen issue. We'll discuss about renaming event on lazdevel list, and indeed this issue is correctly closed since reporter asked for OnSelectionChanged. I do not agree with such name (as you can see in my previous note), but I agree that this issue can be resolved because Felipe fixed it correct (as reporter asked) ... maybe too fast without previous discussion about naming, but that's another story.

Felipe Monteiro de Carvalho

2012-01-27 15:03

developer   ~0056113

I don't like "OnChange" it does not specify what was changed, it is too inespecific. The Item itself has not changed, what changed was the selection, so: OnSelectionChanged which is related to TTreeView.OnSelectionChanged which has the same name as this one for a similar function. So the naming is not a novelty, it follows a pattern in the LCL.

Lists are always refered to have a list of selected objects. A TRadioGroup is a list of TRadioButtons, and in the list only 1 item can be selected at a time.

I'm not sure where OnItemChanged came from, it looks like a short version of "OnSelectedItemChanged". Google and the IDE Find in Fiels both do not show any occurence of it in the LCL.

Bart Broersma

2012-01-28 11:57

developer   ~0056135

@Zeljan: OK, won't happen again ;-)
@Felipe: Thanks for the elaborate explanation.

Issue History

Date Modified Username Field Change
2012-01-25 17:36 Reinier Olislagers New Issue
2012-01-25 17:36 Reinier Olislagers Widgetset => GTK, GTK 2, Win32/Win64, WinCE, Carbon, Cocoa, QT, fpGUI, CustomDrawn
2012-01-26 15:44 Zeljan Rikalo LazTarget => 1.0
2012-01-26 16:35 Felipe Monteiro de Carvalho Fixed in Revision => 34957
2012-01-26 16:35 Felipe Monteiro de Carvalho Status new => resolved
2012-01-26 16:35 Felipe Monteiro de Carvalho Fixed in Version => 0.9.31 (SVN)
2012-01-26 16:35 Felipe Monteiro de Carvalho Resolution open => fixed
2012-01-26 16:35 Felipe Monteiro de Carvalho Assigned To => Felipe Monteiro de Carvalho
2012-01-26 18:38 Bart Broersma Note Added: 0056086
2012-01-26 18:50 Zeljan Rikalo Note Added: 0056087
2012-01-27 11:50 Reinier Olislagers Status resolved => closed
2012-01-27 12:21 Bart Broersma Status closed => assigned
2012-01-27 12:21 Bart Broersma Resolution fixed => reopened
2012-01-27 12:21 Bart Broersma Note Added: 0056106
2012-01-27 13:39 Zeljan Rikalo Note Added: 0056109
2012-01-27 15:03 Felipe Monteiro de Carvalho Note Added: 0056113
2012-01-27 15:03 Felipe Monteiro de Carvalho Status assigned => resolved
2012-01-27 15:03 Felipe Monteiro de Carvalho Resolution reopened => fixed
2012-01-28 11:57 Bart Broersma Status resolved => closed
2012-01-28 11:57 Bart Broersma Note Added: 0056135