Print Page | Close Window

CXTPPropertyGridItem hexadecimal input ??

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=3057
Printed Date: 24 November 2024 at 8:06pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPPropertyGridItem hexadecimal input ??
Posted By: hpesata
Subject: CXTPPropertyGridItem hexadecimal input ??
Date Posted: 18 October 2005 at 12:08pm
Hi!

XTP 9.70

I would like to create a custom grid item which allows input of hex-values like:

0xFFFF

I tried to use SetMask() to restrict the input to hex-characters, but it didnt work as expected. I also dont want the "0x" to appear in my final value-string, it should just be displayed as a header to mark the hex-input.
If this isnt possible, it would be good, if the user cant edit the "0x" header.
the input should just be resticted to 0-9 and A-F.

how can I accomplish a hex-input property grid item like that ?

thanx in advance!

regards,
Hans




Replies:
Posted By: Oleg
Date Posted: 18 October 2005 at 1:13pm

Try this

CXTPPropertyGridItem* pItemMaskEdit = pCustom->AddChildItem(new      CXTPPropertyGridItem(_T("Base Address"), _T("0x0000")));
pItemMaskEdit->SetMask(_T("0xHHHH"), _T("0x____"));

+

use

pItemMaskEdit->GetMaskedText();

to get text without mask (without "0x")



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: hpesata
Date Posted: 19 October 2005 at 12:33pm
Hi Oleg!

thanx for your reply!

actually the way the masked edit is displayed doenst fit our other (non-hex) property grid items. they dont have a prompt, but the hex-item one does...

this doesnt look too good, so I decided to use another approach by overriding the inplaceedit control  and use OnChar() to limit the input to hex-keys (0-9,A-F)

regards,
Hans




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