Text Box Controls

Need a new feature for your application? Post your request here.

Moderators: Frank Hileman, Anne Szyjan

User avatar
Frank Hileman
Site Admin
Posts: 1400
Joined: Sun Jul 25, 2004 8:16 pm
Location: California
Contact:

Post by Frank Hileman » Sat Nov 11, 2006 4:50 am

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 VG.net 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 VG.net. His proposed UI library has complex controls and lots of properties that go beyond the basic ones planned for the standard VG.net 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.

Regards,

User avatar
Frank Hileman
Site Admin
Posts: 1400
Joined: Sun Jul 25, 2004 8:16 pm
Location: California
Contact:

Re: Text Box Controls

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

R19Dymn,

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.

Regards,
Frank Hileman

Post Reply