GUI development: Difference between revisions
No edit summary |
Ctopenpetra (talk | contribs) |
||
Line 114: | Line 114: | ||
* can load data from the server or cache, using TListTableEnum values; | * 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() | ** also works with TListTableEnum.UserDefinedList, then you have to set the property Table before you call TCmbAutoPopulated::InitialiseUserControl() | ||
* 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. | |||
* [[Using Auto-Populated Combo Boxes With Non-Unique Display Members]] | * [[Using Auto-Populated Combo Boxes With Non-Unique Display Members]] | ||
Revision as of 13:13, 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.
- For a discussion and comparison of rich desktop application vs. rich web interface, see Rich desktop application vs. rich web interface.
- For a discussion and comparison of several GUI frameworks, see GUI Frameworks Comparison and Web GUI Frameworks Comparison.
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:
- Style guide: see eg. http://library.gnome.org/devel/hig-book/stable/ GNOME Human Interface Guidelines 2.2
- free icons under creative common license: http://www.icon-king.com/projects/nuvola/
- also creative common license icons: http://www.userinterfaceicons.com/preview.php
- see also KDE Look.org, Artwork Icons etc: http://www.kde-look.org/index.php?xcontentmode=22x27
- free country flags icons and others: http://www.famfamfam.com/lab/icons/
- free icons from Javier Odriozola: http://www.jodriozola.com/blog/?p=10
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
- All Maintain Table screen allow CRUD (Create, Read, Update, Delete [1]) operations for a specific system table/lookup table.
- See How-To: Creating a Maintain Table screen
- 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
- Provide the menus that the user needs to get to all the appropriate screens.
- See Navigation and Dashboard
- Special dialogs
- Progress Tracker Dialog: dialog with a progress bar for a long-running job that is controlled via WebConnector
Controls / Widgets
These controls have been quite useful or will become more important:
- Grid
- icons, checkboxes in columns
- load from datatable
- refresh data
- select row or column
- delayed data loading
- at the moment only used readonly
- sort by column
- tooltips for row
- for Windows.forms, we are using DevAge SourceGrid (MIT license, compatible to GPL)
- see also Thoughts about TreeViewGrid or Collapsable DataGrid
- Edit Field for Partner Key with Search button
- Toolbar
- show tooltips for the toolbar buttons
- Balloon special non modal message boxes http://www.codeproject.com/KB/miscctrl/balloonnet.aspx (CPOL license, problem with GPL)
- 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()
- 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.
- Using Auto-Populated Combo Boxes With Non-Unique Display Members
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