Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - CXTPPropertyGridItem hexadecimal input ??
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPPropertyGridItem hexadecimal input ??

 Post Reply Post Reply
Author
Message
hpesata View Drop Down
Groupie
Groupie


Joined: 16 July 2004
Status: Offline
Points: 60
Post Options Post Options   Thanks (0) Thanks(0)   Quote hpesata Quote  Post ReplyReply Direct Link To This Post Topic: CXTPPropertyGridItem hexadecimal input ??
    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

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 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
Back to Top
hpesata View Drop Down
Groupie
Groupie


Joined: 16 July 2004
Status: Offline
Points: 60
Post Options Post Options   Thanks (0) Thanks(0)   Quote hpesata Quote  Post ReplyReply Direct Link To This Post 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

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.234 seconds.