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 » U++ Widgets - General questions or Mixed problems » QTF with QtfRichObject as Button label causes crash
QTF with QtfRichObject as Button label causes crash [message #26438] Sat, 01 May 2010 23:26 Go to previous message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

	//ButtonOption button;

	DrawingDraw dd(63, 187);
	dd.DrawImage(0,0,IMG::silo_small);

	static Size ppi(72,72);// = ScreenDraw(true).GetPixelsPerInch();
	QtfRichObject qrdd(CreateDrawingObject(dd.GetResult(), Size(63*ppi.cx/10, 187*ppi.cy/10), Size(63*ppi.cx/10, 187*ppi.cy/10)));

	//setup button label
	button.SetRect(x,y,116,300);
	String qtf;
	qtf << qrdd;
	
	PromptOK(qtf); // <<-- works perfectly
	
	qtf.Insert(0, '\1');
	button.SetLabel(qtf); // <<-- causes no run-time error itself, but app crashes on painting this button

I've noticed that in case of drawing Image inside Prompt-dialog, image is painted with noticable delay (about 100-200 milliseconds). May be it is somehow interconnected with painting button error...

P.S. The image is painted on white background, while it is semi-transparent itself. Is there a way to paint it using transparent background?

[Updated on: Sat, 01 May 2010 23:30]

Report message to a moderator

 
Read Message
Read Message
Previous Topic: WhenSelected callback to DropList
Next Topic: Proposal: add IsReadOnly() handling inside ButtonOption
Goto Forum:
  


Current Time: Sat Apr 27 16:07:01 CEST 2024

Total time taken to generate the page: 0.02759 seconds