Print Page | Close Window

SOLVED: Popup Control

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=11382
Printed Date: 29 May 2024 at 11:22pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: SOLVED: Popup Control
Posted By: JasonG
Subject: SOLVED: Popup Control
Date Posted: 10 July 2008 at 9:59am
Is there any sample code that demos the use of the popup control?

I have some code below - seems easy enough, but I am not getting any text in the popup box!


Sub doPopup()
  Dim P As PopupControlItem
  Popup.RemoveAllItems
  Set P = Popup.AddItem(Screen.Width - Popup.Width, _
                                        Screen.Height - Popup.Height, _
                                        Screen.Width, _
                                        Screen.Height, _
                                        "NEW MESSAGE")
  Popup.Show
End Sub



-------------
Product: Xtreme SuitePro (ActiveX) 12.0.1
Platform: Windows Vista/XP
Language: Visual Basic 6.0 SP6



Replies:
Posted By: jpbro
Date Posted: 10 July 2008 at 10:30am
Hi Jason,

I don't have time to test it right now, but AFAIK the PopupControl uses Pixels, but the Screen object returns Twips (often Pixles *15), so your text is likely appearing beyond the visible edges of the popup.

Also, I don't think you need to reference the screen at all when adding an item since the left, top, width and height should be relative to the PopupControl window...

Try


Set P = Popup.Additem(0,0,Popup.Width, Popup.Height, "New Message")


and see if you get any text.



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

Language: Visual Basic 6.0 SP6



Posted By: JasonG
Date Posted: 10 July 2008 at 10:33am
Ok, that works. Awesome.

does this control support Markup?


-------------
Product: Xtreme SuitePro (ActiveX) 12.0.1
Platform: Windows Vista/XP
Language: Visual Basic 6.0 SP6


Posted By: jpbro
Date Posted: 10 July 2008 at 11:48am
Sure it does...anything with an EnableMarkup property does, so:


   With Me.PopupControl1
      .EnableMarkup = True
      .VisualTheme = xtpPopupThemeCustom    ' For a blank canvas, easier to see for testing
     
      .AddItem 0, 0, .Right, .Bottom, "<TextBlock>This is <Bold>BOLD!</Bold></TextBlock>"
      .Show
   End With



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

Language: Visual Basic 6.0 SP6



Posted By: JasonG
Date Posted: 10 July 2008 at 11:58am
Originally posted by jpbro jpbro wrote:

Sure it does...anything with an EnableMarkup property does, so:


   With Me.PopupControl1
      .EnableMarkup = True
      .VisualTheme = xtpPopupThemeCustom    ' For a blank canvas, easier to see for testing
     
      .AddItem 0, 0, .Right, .Bottom, "<TextBlock>This is <Bold>BOLD!</Bold></TextBlock>"
      .Show
   End With


Not sure how, but I glossed right over the .EnableMarkup property. Thanks again!


-------------
Product: Xtreme SuitePro (ActiveX) 12.0.1
Platform: Windows Vista/XP
Language: Visual Basic 6.0 SP6


Posted By: JasonG
Date Posted: 10 July 2008 at 12:12pm
hmm, actually - the markup is not working....

check out the screenshot... http://www.jasongoldberg.com/images/ss.jpg - http://www.jasongoldberg.com/images/ss.jpg



-------------
Product: Xtreme SuitePro (ActiveX) 12.0.1
Platform: Windows Vista/XP
Language: Visual Basic 6.0 SP6


Posted By: jpbro
Date Posted: 10 July 2008 at 12:34pm
Maybe try <LineBreak/> instead of <br>? I'll try testing it later....

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

Language: Visual Basic 6.0 SP6



Posted By: JasonG
Date Posted: 10 July 2008 at 12:37pm
Ok, actually replacing the <BR>'s worked perfectly. Just gotta figure out how to word wrap and I'm all set :)

-------------
Product: Xtreme SuitePro (ActiveX) 12.0.1
Platform: Windows Vista/XP
Language: Visual Basic 6.0 SP6


Posted By: jpbro
Date Posted: 10 July 2008 at 12:55pm
Add a TextWrapping='Wrap' attribute to your TextBlock element

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

Language: Visual Basic 6.0 SP6



Posted By: JasonG
Date Posted: 10 July 2008 at 1:12pm
u are the man. is there a Markup guide around I could reference?


-------------
Product: Xtreme SuitePro (ActiveX) 12.0.1
Platform: Windows Vista/XP
Language: Visual Basic 6.0 SP6


Posted By: Aaron
Date Posted: 10 July 2008 at 1:41pm
Hi,
 
Check the Help directory, you will find MarkUpGuide.chm


-------------
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: JasonG
Date Posted: 10 July 2008 at 3:19pm
Thanks += 1

-------------
Product: Xtreme SuitePro (ActiveX) 12.0.1
Platform: Windows Vista/XP
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