Home » U++ Library support » U++ Widgets - General questions or Mixed problems » How to resize an ImageCtrl to fit the Image?
Re: How to resize an ImageCtrl to fit the Image? [message #5625 is a reply to message #5550] |
Fri, 06 October 2006 11:07   |
James Thomas
Messages: 26 Registered: June 2006
|
Promising Member |
|
|
Sorry it's taken a while to reply, I've been away all week.
SetRect was the first thing I tried, but using it causes strange behaviour in my app which I assumed was normal until I read your post.
The problem is that if I run the following two lines in the constructor (after CtrlLayout of course)
Rect r = _imgLogo.GetRect();
_imgLogo.SetRect(r);
the control moves to a different place in the window. If you then call GetRect again the returned rectangle is exactly as you would expect (ie no change). Perhaps something else has changed?
Unfortunately I have been unable to reproduce this in a simple example, but clearly this is the wrong behaviour. If you have any suggestions as to how I might fix/trace this they would be greatly appreciated, though I understand this is difficult until I can reproduce it.
Cheers.
EDIT: This happens with both 605 and dev-2 versions.
[Updated on: Fri, 06 October 2006 11:18] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Fri Jun 06 11:04:46 CEST 2025
Total time taken to generate the page: 0.04402 seconds
|