Friday, March 27, 2015

EditX Class - ssUltimate Library

This is the version of the sseditbox of ssClasses in this library.  This is a dropdown edit box which I designed to save space on form.  It appears as an ordinary textbox on form that is designed for long input such as those for memo fields.

While an editbox can contain more than the visible section via scrolling up and down, there might be situations where your form is so full of controls that there is not enough room to fit a decent editbox there; and this is where this becomes useful.

This class is built of two section, the one shown in the form that looks like a plain textbox, and a dropdown section that appears when you are typing and you reached the end of the textbox portion or when you click on the down arrow icon.

Once it looses focus, it auto-hides the dropdown section, just like a combobox.   Well yes, you can think of this just like a combobox but instead of lists of selection for the dropdown section, it has a plain editbox there.

What is New?

 - Cleaner codes versus ssEditBox, as I removed a lot of properties on PEM that is no longer needed in this version.

- Now it is a Control class

- _DropOnFocus property.  This is what triggers the class to show dropdown section outright or not on GotFocus event of the class.  By default this has a value of .T. or auto-drop on focus.

When dropdown section is visible, it always position the mouse pointer to the last entry so you can continue where you left off.

When you turn its value to .F., then dropdown will be triggered either when you reach the end of the textbox or when you click on the dropdown arrow.

_ndropwidth - Default value of 0 or adjust based on the width of your edtX (same width). If you want the dropdown section to be wider for better encoding, then set the desired width here.

_ndropheight - Default value of 0 or a height of 138.  Adjust your desired height if you want taller dropdown section.

Showing two class instance on form, one is made wider than the other


Running on default values (auto-width based on class width on form, height of 138)


Dropdown section size controlled, _ndropwidth = 500 and _ndropheight = 200



- FontName - font name of the textbox section
- FontSize = font size of the textbox section
- _FontName = font name of the dropdown section
- _FontSize = font size of the dropdown section 

The above 4 properties will give the developer the ability to control the font name and sizes for both the textbox and dropdown sections.  Now you can make the font for the dropdown section bigger than the textbox section


 or the reverse, your choice.  Helps rheumatic eyes problem a bit :)


Miscellaneous info:

Double-click quickly erase previous entry.

On runtime, the height of EditX control class will auto-adjust based on the font name and size you set for the textbox section.  The width is retained based on the width you set during design time.

If you noticed on some of the images, the lower arrow of the dropdown editbox is sometimes partially hidden.  Fixed that last night.

Unlike my other classes, the various properties and features of this class can be set straight using PEM (Other tab).


No comments:

Post a Comment