GUI development: Difference between revisions

From OpenPetra Wiki
Jump to navigation Jump to search
Line 117: Line 117:
* Please Note:
* Please Note:
** does not use the event: SelectionChangeCommitted due to the changing order in which it fires, which depends upon how the user makes a selection
** does not use the event: SelectionChangeCommitted due to the changing order in which it fires, which depends upon how the user makes a selection
** does not handle the Focussed property as expected, which can remain as false during focus when inside a container control such as a groupbox.
** does not update the Focussed property as expected, which can remain as false during focus when inside a container control such as a groupbox.


'''TCmbLabelled''':
'''TCmbLabelled''':

Revision as of 13:16, 31 March 2016

GUI frameworks

The default GUI framework used by OpenPetra.org at the moment is Windows Forms (WinForms), .NET's native GUI framework, which means that openPETRA by default runs as a desktop application.

OM has decided on using Windows Forms for the Petra product (on which openPETRA is based) more than three years ago, mostly because that was the only stable Client framework available at that time that worked with well with .NET. At that point in time, and still as of now, OM doesn't have a need for running Petra/openPETRA in a Browser or in a cross-platform scenario, so we don't have a rich web interface for openPETRA yet. That doesn't mean that a rich web interface for openPETRA couldn't be done - please see the following discussion for our opinion on that, and the GUI Frameworks Comparison and Web GUI Frameworks Comparison pages for the research we did on available frameworks.

GUI internationalisation

see Comparison I18N

Customizing OpenPetra

Code Generation

GUI Style and Design

For both the website and the OpenPetra client we need people with an eye for design, colors, etc. Please join us! We desperately need you!

Some links that might be useful:

General screen types and layouts

  • Edit screens
    • This is the most common type of screen in openPETRA. Edit screens are used for data entry and for viewing of data.
    • See Architecture Edit screens
  • Complex Edit screens
    • Might have many Tabs, give access to a lot of data, etc.
    • Example: Partner Edit screen.
  • Find screens
    • For finding of database records of a particular type.
    • Example: Partner Find screen.
  • Report parameter screens
    • allows the user to select options for a specific report.
  • Import/Export screens
    • allow importing and exporting of data
  • Maintain Tables screens
  • Special screens
    • Those are screens whose layout and function is unique to that screen.
    • Examples: Login screen, Intranet Export, etc
  • Assistants
    • These multi-step screens guide the user through complex operations.
  • Main screen, Menu screens
  • Special dialogs

Controls / Widgets

These controls have been quite useful or will become more important:

  • Edit Field for Partner Key with Search button
  • Toolbar
    • show tooltips for the toolbar buttons
  • Statusbar/Tooltips
    • TODO explanation is taken from the Shared Datastore, the help text from petra.xml
    • Edit fields: if you tab into a field, or click with the mouse into it, the explanation should be displayed in the statusbar
    • Edit fields: if you hover with the mouse over an edit field, the tooltip should display the explanation
    • buttons work the same as the edit fields
    • menu items: no tooltip, no statusbar info
    • toolbar buttons: show tooltips
    • using 3rd party control: EWSoftware.StatusBarText@CodeProject (Problem: CodeProject license not compatible to GPL? Wikipedia CPOL)
  • Groupbox that can be collapsed
    • save space
    • tooltip on the +/-
    • shortcut key to collapse/open
    • yellow background for part of the groupbox text when it is collapsed (subcaption, partner class)
  • Restore the window state and position
  • XP Style Task Panel

Printing & Preview controls

  • there is one screen for the preview of reports
  • we need TPrintPreviewWithToolbar for printing to paper
    • scroll the pages, jump to page; with event that can be caught outside, to select other rows in a grid
  • TPrintPreviewList: a grid and TPrintPreviewWithToolbar and splitter
  • TEmailPreviewWithToolbar: similar to TPrintPreviewWithToolbar, but for sending emails; has send button etc
  • TEmailPreviewList: a grid and TEmailPreviewWithToolbar and splitter
  • TFrmPrintProgress: a GUI screen with Pause and Abort buttons that manages the print queue especially when printing a large number of documents in a mailing, for example. More information in Print Progress and Managing the Print Queue
  • Print Preview With Templater and Windows 7. This page has important information about setting up a client using Windows 7.

Overview Comboboxes

TCmbAutoPopulated:

  • defined in Ict.Petra.Client.CommonControls
  • derived from System.Windows.Forms.UserControl
  • contains a TCmbLabelled control
  • can load data from the server or cache, using TListTableEnum values;
    • also works with TListTableEnum.UserDefinedList, then you have to set the property Table before you call TCmbAutoPopulated::InitialiseUserControl()
  • Using Auto-Populated Combo Boxes With Non-Unique Display Members
  • Please Note:
    • does not use the event: SelectionChangeCommitted due to the changing order in which it fires, which depends upon how the user makes a selection
    • does not update the Focussed property as expected, which can remain as false during focus when inside a container control such as a groupbox.

TCmbLabelled:

  • defined in Ict.Common.Controls
  • derived from System.Windows.Forms.UserControl
  • contains a TCmbVersatile and Label control

TCmbVersatile:

  • defined in Ict.Common.Controls
  • derived from TCmbAutoComplete
  • allows to display several columns in the dropdown list

TCmbAutoComplete:

  • defined in Ict.Common.Controls
  • derived from System.Windows.Forms.ComboBox