Print Page | Close Window

Problem with creating inplace list with checkboxes

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=14097
Printed Date: 24 May 2024 at 4:15pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Problem with creating inplace list with checkboxes
Posted By: Xelloss
Subject: Problem with creating inplace list with checkboxes
Date Posted: 22 April 2009 at 3:16am
I need a property grid item that works like CXTPPropertyGridItem with combo button, but list that created upon pressing on combo button should have a checkboxes. So I created a new class CCustomListItem and inherit it from CXTPPropertyGridItem. Additionally I create a new class CInplaceCheckList, inherit it from CXTCheckListBox and add to it following methods from CXTPPropertyGridInplaceList: Create, DestroyItem, PostNcDestroy, DrawItem, MeasureItem, OnKillFocus, OnKeyDown, OnSysKeyDown, OnMouseActivate. Method Create is copied from CXTPPropertyGridInplaceList as is with only changes that instead of CListBox::CreateEx it calls CXTCheckListBox::CreateEx and some handling of checks is added. DrawItem currently just calls CXTCheckListBox::DrawItem.
So, in method OnInplaceButtonDown of CCustomListItem I calls
Create methos of my CInplaceCheckList object.

The problem is:
In release version on first click on combo box control is showed and momentally resized to one pixel in height (maybe something else happened but it looks like resizing). But all keyboard navigation works as it should (I can select necessary element using UP or DOWN key and check\unckeck it using SPACE). To show control with normal height I need to select any normal property grid item after pressing on combo button of my item.
Second problem -
CInplaceCheckList control stays empty in all cases. Just white rectangle is showed. But all keyboard and mouse functions works as it should, e.g. I can freely check\uncheck any elements using mouse.
In debug build all works well - on first click control has apropriate size and all elements are drawed correctly.

Do I miss something while creating my item? What should I do to make it works correctly in release build?



Replies:
Posted By: Xelloss
Date Posted: 07 May 2009 at 4:26am
No help here...
But I already find solution. Issue happens because lack of #include <XTToolkitPro.rc> in project rc2 file...



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net