Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Howto track MessageBar CloseButton
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Howto track MessageBar CloseButton

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


Joined: 15 April 2006
Status: Offline
Points: 59
Post Options Post Options   Thanks (0) Thanks(0)   Quote Josef Quote  Post ReplyReply Direct Link To This Post Topic: Howto track MessageBar CloseButton
    Posted: 17 July 2009 at 12:24pm
Hi,

how do I know if user clicked CloseButton added with .AddCloseButton?

Thank you,
Josef

Product: Xtreme SuitePro ActiveX v13.2.1
Platform: Windows 2008 (64bit)
Language: Visual Basic 6.0
Back to Top
cmm2006 View Drop Down
Senior Member
Senior Member


Joined: 26 September 2006
Status: Offline
Points: 118
Post Options Post Options   Thanks (0) Thanks(0)   Quote cmm2006 Quote  Post ReplyReply Direct Link To This Post Posted: 17 July 2009 at 12:33pm
Hi,
You need to assign an ID button to the close button (ID_MORE_BUTTON), the  when you once you execute the commandbar, check and see if the button was clicked or not:
 
Option Explicit
 
Const ID_MORE_BUTTON=10000
 
Private Sub CreateMessageBar()
   
    Messagebar.Visible = True
     MessageBar.AddButton 10000, "Informations...", "Show more options"
    Messagebar.Message = _
        "<StackPanel Orientation='Horizontal'>" & _
        "        <Image Source='10000'/>" & _
        "        <TextBlock Padding='3, 0, 0, 0' VerticalAlignment='Center'><Bold>Warning: </Bold></TextBlock>" & _
        "        <TextBlock Padding='10, 0, 0, 0' VerticalAlignment='Center'>Your message here...</TextBlock>" & _
        "</StackPanel>"
       
End Sub
 
Private Sub CommandBars_Execute(ByVal Control As XtremeCommandBars.ICommandBarControl)
    Select Case Control.ID
                      Case ID_MORE_BUTTON: ' do whatever...
    End Select
End Seub
Language: Visual Basic 6 SP6
OS: Windows XP Pro SP3
Product: Codejock Xtreme SuitePro 13.1
Back to Top
Josef View Drop Down
Groupie
Groupie


Joined: 15 April 2006
Status: Offline
Points: 59
Post Options Post Options   Thanks (0) Thanks(0)   Quote Josef Quote  Post ReplyReply Direct Link To This Post Posted: 17 July 2009 at 2:40pm
Hi,

this will work for normal buttons, but not for the CloseButton added with .AddCloseButton (the small [x]-Button on the right)

Can I assign an ID to this Close-Button too?

Thank you,
Josef
Product: Xtreme SuitePro ActiveX v13.2.1
Platform: Windows 2008 (64bit)
Language: Visual Basic 6.0
Back to Top
cmm2006 View Drop Down
Senior Member
Senior Member


Joined: 26 September 2006
Status: Offline
Points: 118
Post Options Post Options   Thanks (0) Thanks(0)   Quote cmm2006 Quote  Post ReplyReply Direct Link To This Post Posted: 17 July 2009 at 5:57pm
Hi,
I don't think you can assign any ID for the close button :(
Language: Visual Basic 6 SP6
OS: Windows XP Pro SP3
Product: Codejock Xtreme SuitePro 13.1
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.188 seconds.