Subject | Re: Moving column in a grid |
---|---|
Author | Ryan Nilsson-Harding |
Post date | 2002-11-12T02:07:13Z |
Hi Marco,
Yes, IB_Grid. I'm still getting used to the fact that the dataset
drives the controls! But it is starting to sink in now!!
(Although it's been quite steep, I'm thoroughly enjoying the
learning curve for IBO!
It makes sense once you get your head around it ;) )
That said, I've tried your suggestion but it still does not go to
the field I'm trying to select.
What I'm doing is setting a value in another field, then trying to
move the focus to the next field:
if not qryOrder.FieldByName('STOCK_ID').IsNull then begin
qryOrder.FieldByName('Desc').AsString := 'SAMPLE';
qryOrder.FieldByName('Qty').FocusControl;
end
else
raise Exception.Create('Must have a stock item!');
I have stepped through this code, and the .FocusControl proc is
definately being called, but nothing seems to happen.
The focus remains on the 'Desc' field.
Rgds,
-Ryan
Yes, IB_Grid. I'm still getting used to the fact that the dataset
drives the controls! But it is starting to sink in now!!
(Although it's been quite steep, I'm thoroughly enjoying the
learning curve for IBO!
It makes sense once you get your head around it ;) )
That said, I've tried your suggestion but it still does not go to
the field I'm trying to select.
What I'm doing is setting a value in another field, then trying to
move the focus to the next field:
if not qryOrder.FieldByName('STOCK_ID').IsNull then begin
qryOrder.FieldByName('Desc').AsString := 'SAMPLE';
qryOrder.FieldByName('Qty').FocusControl;
end
else
raise Exception.Create('Must have a stock item!');
I have stepped through this code, and the .FocusControl proc is
definately being called, but nothing seems to happen.
The focus remains on the 'Desc' field.
Rgds,
-Ryan
--- In IBObjects@y..., "Marco Menardi" <mmenaz@l...> wrote:
> IB_Grid? If you mean for "selected column" the active cell in the
> grid, just use TIB_Query.FieldByName
( 'THE_FIELD_YOU_WANT' ).FocusControl.
> remember that with native controls, the visual controls
are "dataset
> driven", i.e. properties of datasets reflect directly into visual
> controls behaviour.
> best regards
> Marco Menardi