Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » RichText,QTF,RTF... » QtfRichObject problem
Re: QtfRichObject problem [message #9150 is a reply to message #9146] Wed, 18 April 2007 23:01 Go to previous message
mirek is currently offline  mirek
Messages: 13984
Registered: November 2005
Ultimate Member
Thinking about it, adding a defualt constructor is a good idea too, so with the next release you will be able to do it this way too:

#include <CtrlLib/CtrlLib.h>

using namespace Upp;

Color col[] = {Yellow, Blue, Green, Red}; 

#define MAX 4

GUI_APP_MAIN
{
	String qtf;
	QtfRichObject o[MAX];
	
	for(int i = 0; i < MAX; i++) {
		DrawingDraw dw(100, 100);
		dw.DrawRect(0, 0, 100, 100, White);
		dw.DrawEllipse(10, 10, 80, 80, Red, 5, Blue);
		dw.DrawRect(50, 50, 50, 50, col[i]);
		o[i] = QtfRichObject(CreateDrawingObject(dw.GetResult(), 1000, 1000));
		qtf << "[A6 This is some drawing in QTF: " << i << o[i] << "&";
	}
	PromptOK(qtf);
}



(Or you can add def construtor now and next release will not break your code... Wink

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: EncodeQTF Where is it?
Next Topic: UWord Speller and 'Whats This?'
Goto Forum:
  


Current Time: Wed Jun 12 12:12:05 CEST 2024

Total time taken to generate the page: 0.01972 seconds