JSDialog Pack 2.0.005

A new release of JSDialog Pack was sent to registered users yesterday. If you haven’t received the new version, please send me an email and let me know.

The item list for this release is as follows:

  • add support for setting the maximum number of visible text lines in the content area. Once exceeded, change the content area to display a scrollable text box
  • add detection if content is too large for the current screen height automatically change to a scrollable text control for the content area
  • add DefaultMonitor property
  • add OnDialogShow event
  • shorten name of large font support function
  • only create the footer control if there is footer text defined
  • only create the instruction control if there is instruction text defined
  • support creating the footer dynamically when content is updated while the dialog is displayed
  • add new wrapper function ShowTimedInfoMessage that allows you to easily create a time out dialog for an information message
  • Improve large font handling.
  • Fix issue where the RTF control was not placed correctly when the Expando was made available while the dialog was executing.

I’ll expand further on the first two items in the list (they are closely related). This involves adding a new property called MaxLines (default 0). When this property is set, only this number of lines will be displayed within the content area. Once this number has been reached, the content area transforms into a scrollable text control.

New  MaxLines property

The default is to show as many lines as possible on the screen whenever possible. Once the dialog is greater than 90% of the screen height, the content is then reduced to take up around 50% of the screen height. So the dialog height must go over the 90% threshold, before it is changed.

I’ve written a demo to illustrate this feature, but haven’t placed it into the available demos so I’ll go over the demo now.

Demo source code: http://www.jed-software.com/files/JSDialogPack_MaxLinesDemo.zip

The demo has four buttons, each button contains a description so I won’t elaborate here.

MaxLines demo application

Clicking on the first button displays a dialog with the specific content. Clicking on the second button, forces only 20 lines of content to be displayed (MaxLines = 20). This causes the content to then be displayed in a scrollable text box.

Display all dialog contentTruncate the content visible lines to 20

Clicking on the images makes them larger.


Comments are closed.