Print Page | Close Window

blank popup window

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=16258
Printed Date: 29 September 2024 at 2:35am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: blank popup window
Posted By: iftekhar
Subject: blank popup window
Date Posted: 23 February 2010 at 11:26am
Hi,
 
Whenever a popup is displayed with no controls in it a square shaped button like item (a guess the default popup window with no item) pops up. I would expect it to show nothing if there is no item in the popup bar. CAn anybody tell me is there any way to disable this behavior so that no popup is displayed when there is no controls in the popup bar.
 
The image with the most might show the problem.
 
Thanks in advence
 


-------------
IAT



Replies:
Posted By: moe188
Date Posted: 26 February 2010 at 10:00am
Hi,
check your code. You are using something similar to:
Set control = .Add(xtpControlPopup, 0, "Icons")
you may want to change xtpControlPopup to xtpControlButton
good luck



-------------
Visual Baisc 6 SP6

Windows XP Pro Sp3, Windows 7
Codejock Xtreme SuitePro ActiveX 15.1.3


Posted By: jpbro
Date Posted: 26 February 2010 at 12:46pm
Or if you want it to be a popup that is only populate with items sometimes, you should set the Enabled property for the Popup Control to FALSE before you have added items to it, and set it to TRUE after you have added items to it.

You could even check the status in the InitCommandsPopup event by testing for the ID of your View control, and then set the Enabled status of your Icons control accordingly.


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: Aaron
Date Posted: 26 February 2010 at 2:01pm
Hi,
 
I'm not that familiar with Commandbars but I would expect that .AutoHideUnusedPopups = True would hide these kind of popups but it didn't. I looked in HELP file and found:
 
Remarks

When AutoHideUnusedPopups is TRUE, the popup menus behave similar to the Windows Start menu.  If all controls in a popup control are hidden, then the entire popup control will be hidden as well.

 
 
So I was close... but not satisfied... So I tried something else:
 
Dim popupCommandbar As CommandBar
Dim commandBarControl As CommandBarControl
                
Me.CommandBars.OPTIONS.AutoHideUnusedPopups = True
                
Set popupCommandbar = CommandBars.Add("PopupTest", xtpBarPopup)
Set commandBarControl = popupCommandbar.Controls.Add(xtpControlButtonPopup, 1, "Control Item")
       commandBarControl.CommandBar.Controls.Add xtpControlButton, 2, "Popup Item"
       commandBarControl.HideFlags = xtpHideWrap
 

If you comment commandBarControl.HideFlags = xtpHideWrap popup will show empty popupitem but with it, it doesn't. As I said before I'm not that familiar with Commandbars so there's definitely a solution without "workarounds"
 
Maybe there's a Commandbars GURU in this forum who actually knows how to solve this...
 
 
 
 
 
 
               


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: jpbro
Date Posted: 26 February 2010 at 5:10pm
I still think changing the enabled status based on whether or not there are children is the way to go - why trick the user into thinking there are some nice icons to see when there aren't? They will point to the menu item, nothing will appear and they will think the app is broken.

I supposed an AutoDisableEmptyPopups option would be nice to automate the process.


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: Aaron
Date Posted: 27 February 2010 at 3:33am
Hi Jason,
 
You are right about that, would be nice option to have and @ https://forum.codejock.com/member_profile.asp?PF=3101&FID=113 - iftekhar  forget what I replied, I was totally wrong about this
 
 
 
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: jpbro
Date Posted: 27 February 2010 at 12:46pm
Here's a small demo of what I was suggesting:

uploads/20100227_124629_CmdBarDynamicEn.zip - uploads/20100227_124629_CmdBarDynamicEn.zip


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6




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