GUI development: Difference between revisions

From OpenPetra Wiki
Jump to navigation Jump to search
Line 66: Line 66:


=== Overview Comboboxes ===
=== 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()
'''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

Revision as of 20:11, 24 August 2009

GUI frameworks

The default framework used by OpenPetra.org at the moment is Windows.Forms. This is due to quite a lot of existing code that has already been written for Petra using Winforms.

For a discussion and comparison of several GUI frameworks, see GUI Frameworks Comparison

GUI internationalisation

see Comparison I18N

Code Generation

GUI Style guide

General screen types and layouts

  • Special screens (unique): Login screen, Intranet Export, etc
  • main screens: provide the menus that the user needs to get to all the appropriate screens
  • CRUD operations for single table (Create, Read, Update, Delete: http://en.wikipedia.org/wiki/Create,_read,_update_and_delete)
  • Find screens
  • Export screens
  • Complex Edit screens, with many tabs etc
  • Assistants: guide the user through complex operations
  • report parameter screens: the user selects the options for a report to run

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)
  • 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

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()

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