PDA

View Full Version : Suggestion: Messagebar



Pieter van Dieren
23-Feb-2010, 08:09 PM
I wrote some code to use the messagebar object of the commandbars.
Are you interested in adding this to the Sig classes?

From the CodeJock help:

http://support.dataaccess.com/Forums/attachment.php?attachmentid=3256&stc=1&d=1266973619

Nicole Wright
23-Feb-2010, 09:31 PM
Pieter,

I'm interest.

Martin
24-Feb-2010, 04:08 AM
Pieter,
We are always interested in adding new features to the Class set, If you've found a need for it then someone else will too. Any help is always wecome. ;)

Pieter van Dieren
24-Feb-2010, 04:58 AM
Ok, here it is.

Comments:
The Messagebar is a child of the CommandbarSystem.
But because I only needed it in my Ribbonbar, I added it to my subclass of cSigCJRibbonBar (which is called cBgSigCjRibbonBar).
It would be nice if it could be added to the cSigCJCommandBarSystem class instead: it then would be available to all of us.

By the way: This subclass also contains some code to hide RibbonTabGroups (which isn't available in the cSigCJRibbonTabGroup class afaik)

We all have our own way of coding. I tried to follow the Sig way, but feel free to change it to your likings. ;-)

Usage:


Object oCommandBarSystem is a cBgSigCJRibbonBar

Object oMessageBar is a cBgCjMessageBar
Set piTextColor to 5460695
End_Object

.....
End_Object

// Show message
Send DoShowMessageBar of ghoCommandBars "This is the message" "Title"

// Hide message
Send DoHideMessageBar of ghoCommandBars


Properties/Methods



Messagebar oject:

pbCloseButton
Hides or shows close button
psCloseButtonTooltip
Text to show in Tooltip (in Dutch now)
piTextColor
RGB color that should be used for the message
Commandbar system:

Procedure DoShowMessageBar String sMessage String sTitle
Shows the message using XAML as shown in the CodeJock example
Procedure DoHideMessageBar
Hides the messagebar
Todo

You can also add your own buttons. Didn't make anything for that (don't need it yet)
It should be possible to show images in the XAML text. I tried to do so (adding an images to the commandbar imagelist and using it's ID), but it didn't work. Any suggestions would be appreciated.