View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0038326 | Lazarus CCR | rx | public | 2021-01-07 02:42 | 2021-01-07 06:34 |
Reporter | Bambang Pranoto | Assigned To | Lagunov Aleksey | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | assigned | Resolution | open | ||
Platform | Linux | OS | ubuntu | ||
Summary | 0038326: TRxDBCurrEdit ignores the ReadOnly property. | ||||
Description | TRxDBCurrEdit ignores the ReadOnly property. | ||||
Steps To Reproduce | 1. Download the attached project 2. Compile and run the demo 3. Click the button to set the readonly property of the TRxDBCurrEdit readonly to true 4. You can still edit the value eventhough it is readonly | ||||
Tags | No tags attached. | ||||
Widgetset | |||||
Attached Files |
|
|
|
|
Attached is my fix. rxdbcurredit_honour_readonly.diff (1,254 bytes)
--- rxdbcurredit_original.pas 2021-01-07 11:43:28.361189000 +0700 +++ rxdbcurredit.pas 2021-01-07 12:18:09.811847009 +0700 @@ -192,20 +192,30 @@ procedure TRxDBCurrEdit.KeyDown(var Key: Word; Shift: TShiftState); begin inherited KeyDown(Key, Shift); - if Key=VK_ESCAPE then - begin - //cancel out of editing by reset on esc - FDataLink.Reset; - SelectAll; - Key := VK_UNKNOWN; + if Self.FDataLink.Editing then begin + + if Key=VK_ESCAPE then + begin + //cancel out of editing by reset on esc + + FDataLink.Reset; + SelectAll; + Key := VK_UNKNOWN; + + end + else + if (Key<>VK_UNKNOWN) then + begin + //make sure we call edit to ensure the datset is in edit, + //this is for where the datasource is in autoedit, so we aren't + //read only even though the dataset isn't realy in edit + FDataLink.Edit; + end; end - else - if (Key<>VK_UNKNOWN) then - begin - //make sure we call edit to ensure the datset is in edit, - //this is for where the datasource is in autoedit, so we aren't - //read only even though the dataset isn't realy in edit - FDataLink.Edit; + else begin + if Key <> VK_TAB then begin + Key := VK_UNKNOWN; + end; end; end; |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-01-07 02:42 | Bambang Pranoto | New Issue | |
2021-01-07 02:42 | Bambang Pranoto | Status | new => assigned |
2021-01-07 02:42 | Bambang Pranoto | Assigned To | => Lagunov Aleksey |
2021-01-07 02:42 | Bambang Pranoto | File Added: rxdbcurredit_ignores_readonly.zip | |
2021-01-07 06:34 | Bambang Pranoto | Note Added: 0128136 | |
2021-01-07 06:34 | Bambang Pranoto | File Added: rxdbcurredit_honour_readonly.diff |