Print Page | Close Window

Display customized text in StatusBar

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=13793
Printed Date: 07 October 2024 at 2:30am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Display customized text in StatusBar
Posted By: coolzsunil
Subject: Display customized text in StatusBar
Date Posted: 25 March 2009 at 6:03am
Hi,
 
I have ActiveX: Xtreme Command Bars ActiveX v13.0.0.
The pane 0 in Statusbar displays text when we hover over any toolbar or menuitem.
My requirement is that I have to display the text plus some customized text.
This customized text depends on the toolbar or menu item over which mouse is hovering.
 
Is there any way to capture the Mouse Hover event to display customized text in Status bar?
 
Regards
Sunil



Replies:
Posted By: Oleg
Date Posted: 26 March 2009 at 2:18am
Hello,
 
You can set some Id to first pane - in this case you have manually set test to StatusBar.
 
Now catch ControlSelected ans set it.
 
Private Sub CommandBars_ControlSelected(ByVal Control As XtremeCommandBars.ICommandBarControl)
    If (Not Control Is Nothing) Then "Set Text to" Control.DescriptionText
End Sub


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: coolzsunil
Date Posted: 26 March 2009 at 7:27am
Thanks.. It seems to solve my problem.
 
I have one more thing though. In addition to customized text, I need to display an icon with the  text on the same pane.
For the icon I have HICON. This HICON is retrieved using the Windows function SHGetFileInfo.
 
a) How can I set the iconindex property using this HICON.
 
I guess when i set the icon index correctly and the Text, it will display the icon and the text in the pane.
 
b) How is the icon and text displayed? I mean is the icon before the text or is the text before the icon?


Posted By: Oleg
Date Posted: 27 March 2009 at 1:59am
Hi,
 
You have first add it to imagemanager of statusbar. CommandBars.ImageManager.AddIcon.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: coolzsunil
Date Posted: 31 March 2009 at 8:09am
Before I add the icon using the CommandBars.ImageManager.AddIcon, is there any way in which I can find out whether
an icon with the same id already exists or not?


Posted By: Oleg
Date Posted: 01 April 2009 at 1:48am
Hi,
 
See methods of ImageManager class.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: coolzsunil
Date Posted: 01 April 2009 at 12:53pm
I could not point to any function. Help would be appreciative.


Posted By: Oleg
Date Posted: 02 April 2009 at 5:11am
Hi,
 
Call CommandBars.Icons.GetImage(id) - if it return "Nothing" you didn't have icon.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: coolzsunil
Date Posted: 02 April 2009 at 8:11am
Hi Oleg,

To get a valid icon I could use ImageManager.Icons.GetImage

GetImage require 2 parameters:

Command
Id of an Image within the control's Icons collection.
Width
Width of the Image to retrieve.
I know the id of the image, but how would  I know which width. Even if I send some random width, it could send a scaled image.
I think this is what the documentaion suggest:
******************************************
If the image with the pm_message.asp?ID=1087&M=OB# - Command  does not have an image of the specified width, then the image size that is the closest match will be XtremeCommandBars%7EImageManagerIcon%7EScaled.html - Scaled  to the desired size.
******************************************

What do you say?




Posted By: Oleg
Date Posted: 03 April 2009 at 12:57am
Hi,
 
Set it to 0 - it will return smallest width.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net