View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0032231 | Lazarus | LCL | public | 2017-08-01 08:12 | 2018-11-07 13:30 |
Reporter | Imants Gulbis | Assigned To | Ondrej Pokorny | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Win64 | OS | Windows | ||
Product Version | 1.8RC3 | ||||
Summary | 0032231: TTaskDialog Do not work with radio buttons on Windows | ||||
Description | It is impossible to check which radio-button is selected because "RadioButton" property is never set. | ||||
Steps To Reproduce | begin if not dlgIcon.Execute then Exit; case dlgIcon.RadioButton.Index of 0:; 1:; 2:; end end; dlgIcon.RadioButton.Index will always cause access violation because it is never set. | ||||
Additional Information | I checked Lazarus code and saw funny thing. function TCustomTaskDialog.DoExecute(ParentWnd: HWND): Boolean; ... begin ... ButtonID := TaskDlg.Execute(TD_COMMONBUTTONS(CommonButtons), DefBtn, TD_FLAGS(Flags), TF_DIALOGICON(MainIcon), TF_FOOTERICON(FooterIcon), DefRB, 0, ParentWnd, False, False, @DoOnButtonClickedHandler); Result := ButtonID>=0; FModalResult := ButtonIDToModalResult(ButtonID); if (TaskDlg.RadioRes>=0) and (TaskDlg.RadioRes<RadioButtons.Count) then FRadioButton := RadioButtons[TaskDlg.RadioRes] as TTaskDialogRadioButtonItem else FRadioButton := nil; end; And in Lcl TTaskDialog I saw this code function TTaskDialog.Execute(...): integer; ... begin ... RadioRes := 0; for i := 0 to high(Rad) do if Rad[i].Checked then RadioRes := i+200; ... end; If radiobutton is selected then RadioRes is always 200 or larger. So this "TaskDlg.RadioRes<RadioButtons.Count" will never be true and FRadioButton will always be nil | ||||
Tags | No tags attached. | ||||
Fixed in Revision | 55653 | ||||
LazTarget | - | ||||
Widgetset | |||||
Attached Files |
|
has duplicate | 0032254 | resolved | Ondrej Pokorny | TTaskDialog with radiobuttons always returns a nil RadioButton property |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-08-01 08:12 | Imants Gulbis | New Issue | |
2017-08-01 08:12 | Imants Gulbis | File Added: example.7z | |
2017-08-05 14:54 | Ondrej Pokorny | Assigned To | => Ondrej Pokorny |
2017-08-05 14:54 | Ondrej Pokorny | Status | new => assigned |
2017-08-10 06:55 | Ondrej Pokorny | Relationship added | related to 0032254 |
2017-08-12 14:31 | Ondrej Pokorny | Relationship replaced | has duplicate 0032254 |
2017-08-12 14:32 | Ondrej Pokorny | Fixed in Revision | => 55653 |
2017-08-12 14:32 | Ondrej Pokorny | LazTarget | => - |
2017-08-12 14:32 | Ondrej Pokorny | Note Added: 0102145 | |
2017-08-12 14:32 | Ondrej Pokorny | Status | assigned => resolved |
2017-08-12 14:32 | Ondrej Pokorny | Resolution | open => fixed |
2018-11-07 13:29 | Imants Gulbis | Note Added: 0111827 | |
2018-11-07 13:29 | Imants Gulbis | Status | resolved => closed |