...and I'm sure that I'm not the only one.
Problem: I need a really good numeric entry field which can be set to accept
either integral values or non-integral values with a specified precision
Potential solutions: Scan the Net for TCurrencyEdit kinda things, try each,
discover HUGE shortcomings, and start again (and again......).
Is it just me, or is any decent entry field necessarily descended from
TCustomControl? Hey, is TCustomControl even a good place to start?
So far, I've some good entry field controls working. They exhibit none of
the "why does it do that?" kind of behaviour that inbuilt Windows
descendants have. Several have popup-helpers (also descended from
TCustomControl) like calendars, numeric keypads etc.
Problems to date that I think someone else may have solved are:
a) Helper controls show up when some kind of focus rule is imposed, but
since they almost always have their parent handle set to 0 ( with
Windows.setparent( helper.handle, 0 ) to avoid clipping, they actually
appear as a blank button on the taskbar! Does anyone know of an easy way to
avoid this?
b) Some of the helpers are swallowing keystrokes...they respond to WM_CHAR
and WM_KEYUP messages, and set Msg.result appropriately, but other keyboard
handlers in the near vicinity ( Form.keypress etc) don't seem to get a look
in, AND ITS ONLY SOME KEYS AARGH!
c) Double-clicking somewhere in a helper (this is a TCustomControl
remember) seems to set some kind of focus flag somewhere, so that if the
helper contains other controls, _one_ of them will receive all mouse and
keyboard messages, whether or not it is vaguely interested in them.
I'm bound to pursue this approach for my entry fields 'coz a, b and c aside,
the controls are much better behaved than any of those which re-introduce
standard windows behaviour, and are inherently able to operate in a
flicker-free fashion. If you've been there and solved some of these
problems, I would love to know either i) that you did it (and snicker
snicker aren't letting on how) ii) that you did it and here's how, or iii)
its impossible, give in and let M$ control the world, iv) that there is a
project somewhere wherein Delphi developers can create controls that
actually work and I should be contributing, v) that there's actually a good
library available out there somewhere (source included) which does this
stuff.
Here's hoping
Trevor
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz