TOutLook2003 / TOutLook2010
Sources: source/classes/outl2003.prg, source/classes/outl2010.prg
Inherits from: TControl
TOutLook2003 and TOutLook2010 are navigation pane controls modeled after the Microsoft Outlook sidebar. They display a header, collapsible groups with icons, and a client area for child dialogs. Both classes share the same API; the difference is the color scheme (Outlook 2003 blue vs. Outlook 2010 light gray).
Key DATA Members
| DATA | Type | Description |
|---|---|---|
oHeader | Object | Header group displayed at the top |
aGroups | Array | Array of TOutLook2003Group navigation buttons |
aDialogs | Array | Array of child dialogs for each group's content area |
nOver | Numeric | Index of the group currently under the mouse cursor |
bChange | Block | Code block executed when the selected group changes |
nOption | Numeric | Index of the currently selected group |
Methods
| Method | Description |
|---|---|
New( oWnd, aPrompts, aBmpNames, bChange, lBorder ) | Create the navigation pane with groups and bitmaps |
Redefine( nId, oWnd, aPrompts, aBmpNames, bChange, aDialogs ) | Redefine from a dialog resource |
AddGroup( cPrompt, cBitmap ) | Add a navigation group with icon bitmap |
SetOption( nOption ) | Switch to the specified group by index |
Commands
@ nRow, nCol OUTLOOK2003 oOut PROMPTS aPrompts BITMAPS aBmps ;
SIZE nW, nH OF oWnd
Example: Navigation Pane
#include "FiveWin.ch"
function Main()
local oWnd, oOutlook
local aPrompts := { "Mail", "Calendar", "Contacts" }
local aBitmaps := { "mail.bmp", "cal.bmp", "cont.bmp" }
DEFINE WINDOW oWnd TITLE "Outlook 2003 Pane" SIZE 700, 500
@ 0, 0 OUTLOOK2003 oOutlook ;
PROMPTS aPrompts BITMAPS aBitmaps ;
SIZE 190, 500 OF oWnd
// For Outlook 2010 styling, use OUTLOOK2010
// @ 0, 0 OUTLOOK2010 oOutlook ...
ACTIVATE WINDOW oWnd CENTERED
return nil
TOutLook2010 Differences
TOutLook2010 uses the same API and method signatures as TOutLook2003. The only differences are:
- Background color:
nRGB( 220, 223, 228 )(light gray) vs. Outlook 2003's dark blue. - Group button gradient colors use warm orange/cyan tones instead of blue tones.
Notes
- The pane is 190 pixels wide by default, positioned on the left side of the window.
- Each group has an associated child dialog created as a WS_CHILD window; switch groups by clicking the group button.
- The
bChangeblock fires when the user selects a different group viaSetOption(). - A right-click popup menu lets users switch between groups programmatically.