Subject | Re: [IBO] IB_LookupCombo.TextWidth |
---|---|
Author | Geoff Worboys |
Post date | 2001-08-20T02:11:36Z |
> But this gives me the wrong result. Does anyone knowGenerally you can just use the Form's Canvas property for such
> how to get the exact width ?
calculations - depending on whether you have changed the font in your
controls. If you have changed the font I am wondering whether you
should be just using a TCanvas (not a TControlCanvas - I am not
certain but there are some device context issues when using
TControlCanvas). Create a TCanvas, assign the font from the control
and then do the width calculation.
Have you allowed for the width of the button on the lookup?
> My second problem is to find an event when to adjust the width.Not sure about this, have you tried the TIB_DataSource.OnDataChange
> I tried ComboBox.OnCloseUp but when this event occurs then
> sometimes
>
> FQryLkNode.FieldByName('TNR_ID_NODEREL').IsNull = true;
>
> I guess that during this event the Dataset is scrolling
> and therefor has no current record. "AfterScroll" fires
> too often. Is there a better event for this ?
event?
Geoff Worboys
Telesis Computing