Subject | Re: [IBO] Floating point values in grid |
---|---|
Author | Geoff Worboys |
Post date | 2001-06-11T11:51:37Z |
> I have TIB_Grid, where users can enter floating point numbers.Update the start of they .KeyPress function in IBG_Editor.IMP so that
> Some users have their system settings set to have ',' (comma)
> as floating point separator, but they still want to use '.' (point).
> In TIB_Edit fields the '.' is automagically translated as ','. Can
> this also be done in grid?
it looks like...
procedure TIB_GridInplaceEdit.KeyPress( var Key: Char );
var
IsValid: boolean;
begin
inherited KeyPress(Key);
with TIB_CustomGrid(Grid) do
if Assigned( SelectedField ) then
with SelectedField do
begin
if (IsNumeric) and
(not SearchAlways) and
(State <> dssSearch) and
(Key in ['.', ',']) then
Key := DecimalSeparator;
<etc>
If this works as desired send the updated file to Jason (along with
details of the IBO version you used) so that he can include the change
in the main release.
HTH
Geoff Worboys
Telesis Computing