MakupLabel and CreateMarkupPrintView |
Post Reply |
Author | |
j.godas
Newbie Joined: 25 November 2009 Location: Spain Status: Offline Points: 6 |
Post Options
Thanks(0)
Posted: 14 December 2010 at 4:10pm |
I am trying to use printpreview.createMarkupPrintView from a markupLabel generate using makupUIElment.
The problem is that createMarkupPrintView only works if markuplabel.caption is full of XAML code. But if you build your XAML content using makupUIElment and his CJ objects, I can find the way to see the XAML code generated. Somebody knows how solve the problem? There is other way, try to export markup content to a context device. I saw some sample, but is not implemented for ACTIVE X Code., isn't it? A simple sample: ------------------------------------------------------ Dim TextBlock1 As MarkupTextBlock Dim Border As MarkupBorder Dim Context As MarkupContext Set Context = MarkupLabel1.MarkupContext Set TextBlock1 = Context.CreateObject("TextBlock") TextBlock1.Text = "Test1" TextBlock1.TextAlignment = xtpMarkupTextAlignmentCenter Set TextBlock1.Background = Context.CreateSolidBrush(vbRed) Set Border = Context.CreateObject("Border") Set Border.Child = TextBlock1 Set MarkupLabel1.MarkupUIElement = Border 'now the markup has contents, but markuplabel1.caption is empty!! PrintPreview.PrintView = PrintPreview.CreateMarkupPrintView(MarkupLabel1.Caption) |
|
Product: Xtreme SuitePro ActiveX Ver. 13.4.2
Platform: Windows XP, Windows 7 www.krontime.com Language: Vb6 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
I think you need an IPrintView interface exposed for the MarkupLabel, and I couldn't find one :(
This would be a great request, unless there is a way to do it that I don't know... |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
Thanks, very good suggestion. Implemented for next release.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
You guys are on a roll, thanks a lot! Is there also a PrintToDc method, or just an IPrintView interface?
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Both added. |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Awesome Oleg - can't wait for V15, thanks for all of your hard work.
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
I'm not sure how what the PrintToDc parameters are, so I'm just thinking out loud here:
I have a "dashboard" view that has summary information, charts, etc... in various ScrollViewers and I would like to be able to print this on separate pages. It would be perfect if we could pass a MarkupUiElement to the PrintToDc method, and it would just print that element and it's children. This would allow me to have a Grid in a ScrollViewer that would be scrollable while on screen, but I could pass the Grid object to the PrintToDc method to print the Grid without the ScrollViewer scrollbars appearing on the output - is this how it works, and if not can it be implemented to work this way? Thanks for any feedback. |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Added additional PrintElementToDC(OLE_HANDLE hDC, MarkupUIElement* Element, int Left, int Top, int Width, int Height) method. |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
I'm very impressed and grateful Oleg. Thank you very much.
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Hannes
Newbie Joined: 15 April 2013 Location: Warschau Status: Offline Points: 1 |
Post Options
Thanks(0)
|
Hi !
I'm new using CodeJock, so sorry for any "stupid" questions in advanced. I use CodeJock in BorlandBuilder and try to use PrintPreview to print XAML strings. Following example from help, made in VB, I keep trying sth like that (having PrintPreview control on the Form): ... IPrintView *ipw; ipw = MyPrintPreview->CreateMarkupPrintView(XAMLString); /* MyPrintPreview is an object of TPrintPreview of course*/ MyPrintPreview->PrintView = ipw; /* and the line above generate error : 'TPrintPreview::PrintView' is not accessible */ Please, anybody help me, because I've lost my hope after many many days of looking for solution of this problem using help of Uncle Google, this forum and help of CodeCojcke :(:(:( |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |