Page 2 of 2

Posted: Sat Nov 11, 2006 4:50 am
by Frank Hileman
The problem with text boxes is the determination of the cursor position, and the coordinates of areas around highlighted text. There are ways to compute this information with a CustomElement. We have been asked for a vector text box many times, so some basic version must be in the standard distribution.

The other types of UI elements mentioned by Lazarus are fairly easy to implement in the current release. Our plan is to provide non-graphical base classes, in the form of source code and binaries, for these basic UI elements, as well as derived classes demonstrating how to create your own visual look.

When I say non-graphical base class, I mean a Picture containing logic, but no Elements. Elements within the Picture will be retrieved by name by the base class or by virtual properties. By overriding properties your derived class can plug in the Elements needed by the base class -- you can design the derived class in the designer.

Justin has lots of experience developing advanced UI libraries using His proposed UI library has complex controls and lots of properties that go beyond the basic ones planned for the standard distribution. Justin, I can put a screen shot on our site if you wish to add one to this thread.

The layout and keyboard focus Justin mentions are important features, but neither feature is strictly necessary for the basic controls mentioned by Lazarus.


Re: Text Box Controls

Posted: Thu Dec 11, 2014 9:30 am
by Frank Hileman

You can use pixels as the unit for specifying the height of text. The actual size of a pixel depends on DPI, and on the Windows operating systems, DPI is not a true figure -- they made it customizable, so it never reflects the actual dots per inch on any real hardware, except by chance. To get the true size of a pixel, you must use information about the specific monitor, which you can probably obtain from the operating system, but that is another discussion entirely. I don't know the answer off-hand.

Frank Hileman