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++ Library : Other (not classified elsewhere) » ImageCtrl issue
Re: ImageCtrl issue [message #15761 is a reply to message #15759] Wed, 07 May 2008 11:12 Go to previous messageGo to previous message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
luzr wrote on Wed, 07 May 2008 09:49

cdoty wrote on Thu, 01 May 2008 15:24

I am having a problem with ImageCtrl:

1) The size of the ImageCtrl is smaller than the image displayed, in MSC8 debug mode.
For example, to display a 256x256 image, I have to set the ImageCtrl rect, in the layout designer, to 228x224.

The control works fine in MSC8 Optimal mode.


Units in layout are not exactly pixels; they get "zoomed" according to the actual default system font used (which makes sense, if you think about it Wink

Mirek


I had the same problem when I was first using Upp. You have two solutions available (both at run-time, you have no way of accurately setting the size at design-time):
1- Resize the control
Rect r = imagectrl.GetRect();
r.SetSize(image.GetSize());
imagectrl.SetRect(r);

2- Rescale the image to fit the ctrl
imagectrl.SetImage(Rescale(image, imagectrl.GetSize()));

James
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Using StartProcess with ping
Next Topic: Display problem with Splitter, GLCtrl and MenuBar
Goto Forum:
  


Current Time: Fri May 31 07:01:30 CEST 2024

Total time taken to generate the page: 0.03079 seconds