Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - SOLVED: Popup Control
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SOLVED: Popup Control

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


Joined: 07 July 2008
Status: Offline
Points: 76
Post Options Post Options   Thanks (0) Thanks(0)   Quote JasonG Quote  Post ReplyReply Direct Link To This Post Topic: SOLVED: Popup Control
    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
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
JasonG View Drop Down
Groupie
Groupie


Joined: 07 July 2008
Status: Offline
Points: 76
Post Options Post Options   Thanks (0) Thanks(0)   Quote JasonG Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
JasonG View Drop Down
Groupie
Groupie


Joined: 07 July 2008
Status: Offline
Points: 76
Post Options Post Options   Thanks (0) Thanks(0)   Quote JasonG Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
JasonG View Drop Down
Groupie
Groupie


Joined: 07 July 2008
Status: Offline
Points: 76
Post Options Post Options   Thanks (0) Thanks(0)   Quote JasonG Quote  Post ReplyReply Direct Link To This Post 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

Product: Xtreme SuitePro (ActiveX) 12.0.1
Platform: Windows Vista/XP
Language: Visual Basic 6.0 SP6
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
JasonG View Drop Down
Groupie
Groupie


Joined: 07 July 2008
Status: Offline
Points: 76
Post Options Post Options   Thanks (0) Thanks(0)   Quote JasonG Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
JasonG View Drop Down
Groupie
Groupie


Joined: 07 July 2008
Status: Offline
Points: 76
Post Options Post Options   Thanks (0) Thanks(0)   Quote JasonG Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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....
Back to Top
JasonG View Drop Down
Groupie
Groupie


Joined: 07 July 2008
Status: Offline
Points: 76
Post Options Post Options   Thanks (0) Thanks(0)   Quote JasonG Quote  Post ReplyReply Direct Link To This Post 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
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.172 seconds.