Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Gallery item bug?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Gallery item bug?

 Post Reply Post Reply
Author
Message
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Topic: Gallery item bug?
    Posted: 06 May 2009 at 9:04pm
In CXTPControlGalleryItem::Draw is the following line:

CRect rcText(rcItem);
rcText.left += 2 + nImageBoxWidth + szImage.cx / 3;

The result is that the text is not visible at all because left is actually greater then right after that line.
Shouldn't that line be:

rcText.top += szImage.cy + 5;

????

Codejock support
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 06 May 2009 at 9:08pm
int nImageBoxWidth  = max(rcItem.Height() - 4, szImage.cx);

????????

This causes a misalignment if width != height.

Codejock support
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 06 May 2009 at 9:18pm
I've derived my own class from CXTPControlGalleryItem and fixed the drawing bugs (on the left)
On the right is the default CXTPControlGalleryItem.

Codejock support
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 08 May 2009 at 3:08am
Originally posted by ABuenger ABuenger wrote:

I've derived my own class from CXTPControlGalleryItem and fixed the drawing bugs (on the left)
On the right is the default CXTPControlGalleryItem.

 
Hi
 
We have never seen this bug, but this is obviously due to us always deriving our own classes for drawing of items :)
 
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 08 May 2009 at 6:40am
I would like to see a property for the text orientation:




Also multiline captions (not only descriptions) and caption+description doesn't work without an image.

Codejock support
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 08 May 2009 at 6:48am
Originally posted by ABuenger ABuenger wrote:

I would like to see a property for the text orientation:




Also multiline captions (not only descriptions) and caption+description doesn't work without an image.

 
Sounds good, but for us we always write our own derived classes so never get the issue.
 
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 08 May 2009 at 6:55am
Originally posted by terrym terrym wrote:

Sounds good, but for us we always write our own derived classes so never get the issue.


How much time does it take you and us to copy the code from the samples, figure out how to get a white background and write a custom Draw method for the items?

So why can't we put a custom control on the dialog and set the class to XTPGalleryControl like we can for the Report control or property grid? How many more customers have to waste their time? The sample was made 04/2008 and 1 year later it's still not in the toolkit.

Codejock support
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 08 May 2009 at 6:59am
Originally posted by ABuenger ABuenger wrote:

Originally posted by terrym terrym wrote:

Sounds good, but for us we always write our own derived classes so never get the issue.


How much time does it take you and us to copy the code from the samples, figure out how to get a white background and write a custom Draw method for the items?

So why can't we put a custom control on the dialog and set the class to XTPGalleryControl like we can for the Report control or property grid? How many more customers have to waste their time? The sample was made 04/2008 and 1 year later it's still not in the toolkit.

 
Very  true it has cost us much time in writing these custom controls, and if a solution can be added this would be great as would also clean up our project a bit :)
 
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 15 May 2009 at 9:14am
Can someone from Codejock confirm this to be a bug? Do you need a sample to reproduce it? Can you implement an text orientation property and multiline captions for 13.1?

Codejock support
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 18 May 2009 at 1:22am

Hi,

Gallery draws text always to right of image. if yo uneed another style you can always override and draw like you need.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
terrym View Drop Down
Senior Member
Senior Member


Joined: 13 April 2007
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote terrym Quote  Post ReplyReply Direct Link To This Post Posted: 18 May 2009 at 2:35am
Originally posted by oleg oleg wrote:

Hi,

Gallery draws text always to right of image. if yo uneed another style you can always override and draw like you need.
 
Ah, that explains why we have an override for each draw we need different :), not a problem for us as we always want things different than standard lol.
Thank you,
Terry Mancey

email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.168 seconds.