Print Page | Close Window

Howto track MessageBar CloseButton

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=14768
Printed Date: 06 October 2024 at 8:32pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Howto track MessageBar CloseButton
Posted By: Josef
Subject: Howto track MessageBar CloseButton
Date 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



Replies:
Posted By: cmm2006
Date 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


Posted By: Josef
Date 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


Posted By: cmm2006
Date 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



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