Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Display customized text in StatusBar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Display customized text in StatusBar

 Post Reply Post Reply
Author
Message
coolzsunil View Drop Down
Groupie
Groupie


Joined: 18 March 2009
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote coolzsunil Quote  Post ReplyReply Direct Link To This Post Topic: Display customized text in StatusBar
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
coolzsunil View Drop Down
Groupie
Groupie


Joined: 18 March 2009
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote coolzsunil Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
coolzsunil View Drop Down
Groupie
Groupie


Joined: 18 March 2009
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote coolzsunil Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 01 April 2009 at 1:48am
Hi,
 
See methods of ImageManager class.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
coolzsunil View Drop Down
Groupie
Groupie


Joined: 18 March 2009
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote coolzsunil Quote  Post ReplyReply Direct Link To This Post Posted: 01 April 2009 at 12:53pm
I could not point to any function. Help would be appreciative.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
coolzsunil View Drop Down
Groupie
Groupie


Joined: 18 March 2009
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote coolzsunil Quote  Post ReplyReply Direct Link To This Post 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 Command does not have an image of the specified width, then the image size that is the closest match will be Scaled to the desired size.
******************************************

What do you say?


Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 03 April 2009 at 12:57am
Hi,
 
Set it to 0 - it will return smallest width.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.171 seconds.