Siderbar Class

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

FoxRibbon Beta v.0.

13, July 2012


Author Guillermo Carrero (Barcelona - Spain)
_SIDEBAR CLASS

INTRODUCTION:

In this document I shall try to explain how to implement a side bar (_SideBar) in our
applications. It is a vertical menu composed of groups of option that can be
collapsed or expanded. It consists of a vertical bar and a separator that changes
the object’s width horizontally.

STEP BY STEP IMPLEMENTATION


STEP 1

1. First in our support class library (ie


MyDesigns.vcx) we add a new class
based in _ScrollContainer of FoxRibbon.vcx
2. In this class we shall add vertically as many _SideGroup as needed,
extending the container as much as necessary and no more (HEIGHT)
3. In each one of the groups we shall add buttons, labels and other FoxRibbon
objects that will be in charge, if applicable, of calling their corresponding
forms.
4. The width of the _ScrollContainer is not determining. The “Left” of the
groups does determine the left and right margin of them. If we indicate a
value of -1, we avoid visualizing the vertical lines of the _SideBarTitle.
When first instantiated the object
shows as collapsed. This class
contains _SiderBarTitle which can be
decorated with an image, the group
title indicated and an auxiliary
complementary label which will only
be visible if its CAPTION is different
from “Auxiliary Label”.

STEP 2
We can now add directly to our form the _SideBar class from FoxRibbon.vcx.
We adjust its limits and position horizontally the separator to determine the initial
width of the menu.
Class / PEM Description
_ScrollContainer
Title Will be the general title of our side bar.
TitleIdTranslate The ID for translation to different languages.
_SideBarGroup
lMinimize Determines whether or not the object can be collapsed.
_SideBar Class
Title Will be the general title of our side bar.
TitleIdTranslate The ID for translation to different languages.
ScrollContainer In this property we refer to the recently created
_ScrollContainer (step 1)
lSplitter Show the separator or not
Method: Reloads the new _ScrollContainer To use different menus as
ReLoad per several criteria.
WITH THISFORM._SideBar
DO CASE
CASE lnOpcion = 1
.ScrollContainer = “invoicing”
CASE lnOpcion = 2
.ScrollContainer = “accounting”
ENDCASE
.ReLoad()
ENDWITH

You might also like