Print Page | Close Window

System button dblclick not working on MDIChild

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


Topic: System button dblclick not working on MDIChild
Posted By: garyhenson
Subject: System button dblclick not working on MDIChild
Date Posted: 23 June 2009 at 1:17pm

We've upgraded our Xtreme SuitePro from 10.4.1 to 13.

Our app is an MDI app. It's 'different' than traditional MDI apps in that we add a ribbon bar and System button to the child windows since each window presents the User with a unique set of 'tools' on the ribbon bar.
 
Double clicking on the System button in the MIDParent works correctly, shutting down the app. But double clicking on the System button of the child windows no longer fires the shutdown event. In 10.4.1 this worked.
 
Is there a workaround or a flag I'm not setting?
 
Thanks again for a great product and great support!


-------------
Software Developer
Product: Xtreme SuitePro (ActiveX) version 13.0
Platform: Windows XP (32bit) - SP 3
Language: Visual Basic 6.0



Replies:
Posted By: Oleg
Date Posted: 24 June 2009 at 1:40am
Hi,
 
Yes for Child windows Execute event is fired instead. Catc it and manually close it.


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


Posted By: garyhenson
Date Posted: 24 June 2009 at 10:15am
Sorry, I'm not sure what you mean.
I catch the cbTitle_Execute event (cbTitle si the ribbon bar that has the large round System button) but it does not catch a double click. It catches the events for the button items I've added ('Save', 'Save and Close' and 'Discard and Close' in my case) but not a double click.
 
Here's how I create the ribbon bar and System button:
... in form load...
    ConfigureMdiChildEditorRibbonBar cmdbars.AddRibbonBar("Title"), bShowRibbonBarQuickAccess
...
 
Private Sub ConfigureMdiChildEditorRibbonBar( _
    ByVal rb As XtremeCommandBars.RibbonBar, _
    ByVal bShowQuickAccess _
)
    With rb
        .AllowMinimize = True
        .EnableDocking XtremeCommandBars.XTPToolBarFlags.xtpFlagStretched
        .ShowCaptionAlways = False
        .ShowGripper = False
        .MinimumVisibleWidth = 100
        .ShowQuickAccess = bShowQuickAccess
       
        AddMdiChildEditorSystemButton rb
   
        .EnableFrameTheme
        .RedrawBar
    End With
End Sub
Private Sub AddMdiChildEditorSystemButton(ByVal rb As XtremeCommandBars.RibbonBar)
    Dim cbp As XtremeCommandBars.CommandBarPopup
   
    Set cbp = rb.AddSystemButton()
    With cbp
        .CommandBar.SetIconSize 32, 32
        .IconId = ID_TRYGEAR_ICON
        .flags = xtpFlagNoMovable
    End With
    AddMdiChildEditorSystemButtonButtons cbp
End Sub
 
' Caller must add BTN_ID_SAVE, BTN_ID_SAVE_AND_CLOSE, and BTN_ID_DISCARD_AND_CLOSE
' to CommandBars' Execute() handler
Private Sub AddMdiChildEditorSystemButtonButtons(ByVal cbp As XtremeCommandBars.CommandBarPopup)
    AddSystemButtonButton(cbp, BTN_ID_SAVE, ICON_SAVE, "Save").Enabled = CanSaveObjects()
    AddSystemButtonButton(cbp, BTN_ID_SAVE_AND_CLOSE, ICON_SAVE_AND_CLOSE, "Save and Close").Enabled = CanSaveObjects()
    AddSystemButtonButton cbp, BTN_ID_DISCARD_AND_CLOSE, ICON_DISCARD_AND_CLOSE, "Discard and Close"
End Sub

Heres my ribbon bar event code:
Private Sub cbTitle_Execute(ByVal Control As XtremeCommandBars.ICommandBarControl)
    Select Case Control.id
    Case BTN_ID_SAVE, BTN_ID_SAVE_AND_CLOSE, BTN_ID_DISCARD_AND_CLOSE
        HandleFileOps Control.id
    End Select
End Sub
Sorry for the confusion.


-------------
Software Developer
Product: Xtreme SuitePro (ActiveX) version 13.0
Platform: Windows XP (32bit) - SP 3
Language: Visual Basic 6.0



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