Subject RE: [IBO] AutoLabel - Bug
Author Claudio Kloss
Geoff,

I think my fix will work only in my situation. In Almost the time I set the
AutoLabel to <Kind: albTop>, <Margin: 0>. If someone else use Kind =
albLeft, it will not work cause my fix are setting the width of the label to
the width of the Edit Control.

I done the fix that way because when we use albTop I think the width of the
label could be, if necessary, the same width of the edit control.

Maybe we should have the behavior of AutoLabel width change according the
Kind Property. albTop should use the width of the edit control and albLeft
should take in consideration the RelativePosition property.

What do you think about it Geoff?

Claudio F. Kloss
MicroLight Informatica Ltda.
Juiz de Fora - MG
Brazil
email: ckloss@...


-----Mensagem original-----
De: Geoff Worboys [mailto:geoff@...]
Enviada em: segunda-feira, 19 de fevereiro de 2001 20:01
Para: IBObjects@yahoogroups.com
Assunto: Re: [IBO] AutoLabel - Bug


> I found that AutoLabel wasn't choosing the correct label
> between "FieldsDisplayLabel" and "FieldsGridLabel", always
> showing the label in "FieldsGridLabel"

The problem with your fix is that it is retreiving the FocusControl
width and not the label width. So whether the fix works or not, will
depend on how wide you made the edit control. It is the available
width of the label which should be used - that is where the text will
be drawn.

My guess is that the autosize nature of the label is confusing the
calculations. Are you using the RelativePosition capability to left
justify your labels - or leaving the labels rightaligned?

I will have a play and see what I can come up with.

Geoff Worboys
Telesis Computing