Re: Text input pane pixel waste and simple layout borders?
On Sunday 22 March 2009 6:01:32 am Mikko Ahonen wrote:
>
> Hello,
>
> I try to fit as many as possible text input panes on single layout.
> The default text input pane seems to waste around 7 pixels below the
> text (see left-most example). Does anybody have an idea why? To allow
> underlining?
I tried your code.
On LWW (using vista), I don't see any wasted pixels on the left, and maybe a line of pixels only on the bottom of the right.
On LWL, I see lots of wastage. The right side is completely wrong - the lower half of the text input pane is wiped out.
I don't know the answer to your question, but
1) Simple-pane is special - the docs say that it is a native window. Somewhere in the docs, there is a caveat about using simple-pane on a pinboard stating that simple-panes will always be on top because they are special.
2) maybe ../examples/capi/elements/grid-impl.lisp gives you another possibility
3) Have you tried the various text doo-dads available on pinboard-layouts (item-pinboard-object, titles, etc)? Maybe you can pack them tighter onto a pinboard manually?
4) You can pack text as closely together as you want (even overlapping) by dropping down into GP and using gp:draw-string. If you really want a text input pane, then you would have to manually implement a keyboard reader (I've done this in the past - it is possible with an output-pane plus an input-model, but becomes painful / boring if you try to implement *every* input gesture known to windows).
5) Knowing that you can draw string anywhere using GP, you might consider building your own drawn-pinboard-object which simply draws the string using gp:draw-string.
pt