Subject Re: TIB_Edit Height problem again
Author Marco Menardi
Maybe there is something I'm missing.
Ok, I complitely forget about Autosize! My foult.
Then I experimented with Autosize = False in IB_Edit and IB_Currency.
In a form with Arial 10, scaled = true, I've some data bound IB_Edit
with Height = 24. I put a IB_Edit with Font (Tahoma,8),
Ctrl3D(False),Heigth(15). At runtime it switches to Height 19. With
Font size = 6 (you can't read it!), at runtime it swithces to 16. I
think that it switches to the minimum necessary to show the selected font.
In another form with Tahoma 10, I've put a IB_Currency with height set
to 18, 3D true, unbound (no datasource/field specified). It does not
resize (don't ask me why!), but you can not use it since nothing is
displayed (too narrow for the font size).
In the data bound form I've then set height to 35, and it was resized
:(. The same does not happend in the no data bound form (IB_Currency
or IB_Edit, but IB_Edit does not work unbound).
Since your problem is make the controls smallest you can, this
considered, I think that IB_Edit, with Autosize = True behaves like
all the other VCL controls, and with Autosize = False gives you the
smallest dimensione useful for display text.
Or I'm missing something again? ;)
Thanks
Marco Menardi


--- In IBObjects@yahoogroups.com, "Ramil Khabibullin" <khabibr@m...>
wrote:
> Hi Marco,
> I agree with you what it related to the VCL part (ancestors).
>
> About height = 35 for TDBEdit and TEdit - try same with
AutoSize=False...
> We can control it!
> I need stylish, compact form. User must see more information at once.
> Grids with 'Tahoma' font and DefaultRowHeight=15 looks great,
> but large Edits don't harmonize with that style.
> Font(Tahoma,8), Ctrl3D(False),Heigth(15) is much better.
> It only my opinion and maybe someone else.
> I look at the code in depth but is not fully successfully while.
> I find that problem hiding in property assignment sequence in ancestors
> tree.
> Height changed by TCustomEdit.AdjustHeight in StdCtrls.pas.
> AdjustHeight don't called when AutoSize=False, but AutoSize assigned
> later when Height and between it something entail AdjustHeight
calling, Font
> assignment for example.
> Simple obvious solve I find, it is assignment AutoSize to False by
default
> in
> TIB_Edit sources, it prevent automatic Height calculation.
> For me it more than enough, but backward compatibility lost for
others...
>
> Regards
> Ramil
>
> ---"Marco Menardi" <mmenaz@l...> wrote in message
> > I've had a look at the code, but seems something related to the VCL
> > part (ancestors). Since the VCL TDBEdit and TEdit has the same
> > behaviour (try height = 35, for instance), I suppose it's something by
> > design that can't be changed without impacting TIB_Edit in a
> > unreasonable manner.
> > TIB_Edit is a "onle line only" edit control, so it's height adjusts
> > based upon font size or other "environmental" factors. For me, it
> > works very well as is.
> > regards
> > Marco Menardi
> >
> >
> > --- In IBObjects@yahoogroups.com, "Paul Hope" <paulhope@a...> wrote:
> > > Ramil
> > >
> > > I had a reply from Jason - saying that he wasn't sure how to solve
> > it - so
> > > as far as I know it is towards the bottom of a pile of things to
do ;-/
> > >
> > > I had a quick look at the source but couldn't quite follow it. It
> > appeared
> > > to me that it always does a get metrics and resizes the control
> > according to
> > > the font with no facility to override this if it has been set
manually.
> > >
> > > Maybe someone else feels brave enough to have a look ;-)
> > >
> > > Regards
> > > Paul
> > >
> > > > Hi All,
> > > > Anyone have decision of inveteracy problem of TIB_Edit?
> > > > I'm talk about TIB_Edit Height problem.
> > > > Here extract from old messages of IB Objects support list:
> > > > "...
> > > > look at the problem with
> > > > the changing height of TIB_Edit (and other controls)
> > > > during runtime vs edit time?
> > > > (Set to 18 height at desingtime and switches to
> > > > 20 during runtime. Even when constraints set in design)
> > > > ...." by Steve Fields, Jul 18, 2001
> > > >
> > > > "...
> > > > I set my IB_Edit height to 17 and Autosize to false. They
stay like
> > > that
> > > > in
> > > > the IDE but appear as 19 high when the app runs? Is this a bug
> > or can I
> > > > control it?
> > > > ..." by Paul Hope, Aug 6, 2002
> > > >
> > > > Or I miss something and this explicit problem was fixed?
> > > > Any help appreciated.
> > > >
> > > > With best regards,
> > > > Ramil Khabibullin
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> >
>
___________________________________________________________________________
> > > > IB Objects - direct, complete, custom connectivity to Firebird or
> > > InterBase
> > > > without the need for BDE, ODBC or any other layer.
> > > >
> > >
> >
>
___________________________________________________________________________
> > > > http://www.ibobjects.com - your IBO community resource for
Tech Info
> > > papers,
> > > > keyword-searchable FAQ, community code contributions and more !
> > > >
> > > > Your use of Yahoo! Groups is subject to
> > http://docs.yahoo.com/info/terms/
> > > >
> > > >
> >
> >
> >
> >
>
___________________________________________________________________________
> > IB Objects - direct, complete, custom connectivity to Firebird or
> InterBase
> > without the need for BDE, ODBC or any other layer.
> >
>
___________________________________________________________________________
> > http://www.ibobjects.com - your IBO community resource for Tech Info
> papers,
> > keyword-searchable FAQ, community code contributions and more !
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
> >