Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Property Grid
  New Posts New Posts RSS Feed - Max Length of Input
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Max Length of Input

 Post Reply Post Reply
Author
Message
Fabian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22 November 2004
Location: Switzerland
Status: Offline
Points: 336
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fabian Quote  Post ReplyReply Direct Link To This Post Topic: Max Length of Input
    Posted: 01 November 2006 at 11:10am
Hello
 
I do not find a property MaxLength to limit the # of characters when editing a string value. Do I miss something?
 
Thanks for a hint
Fabian
Product: Xtreme SuitePro (ActiveX) version 16.2.3

Platform: Windows 7 (32bit)

Language: Visual Basic 6.0 / SP6
Back to Top
farr02 View Drop Down
Groupie
Groupie


Joined: 10 May 2005
Status: Offline
Points: 51
Post Options Post Options   Thanks (0) Thanks(0)   Quote farr02 Quote  Post ReplyReply Direct Link To This Post Posted: 08 November 2006 at 5:35am
Hello,

I had the same problem in the MFC version of property-grid, but I don't know if my solution is suitable for the ActiveX version, too.
First I have created a new, CXTPPropertyGridItem-derived class and then I have overridden the OnSelect function as follows:

void MyGridItem::OnSelect()
{
    CXTPPropertyGridItem::OnSelect();  // call base class first
    if(GetInplaceEdit().GetSafeHwnd())
        GetInplaceEdit().SetLimitText(20);  // limit number of input chars to 20
}

'SetLimitText' is a member of MFC CEdit-class.

Bye
   Holger

Back to Top
Fabian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22 November 2004
Location: Switzerland
Status: Offline
Points: 336
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fabian Quote  Post ReplyReply Direct Link To This Post Posted: 08 November 2006 at 11:14am
Hi farr02
 
Thanks a lot for your reply. I think this doesn't work for ActiveX. But Oleg told me, that MaxLength would be added in 10.4.
 
Thanks, Fabian
Product: Xtreme SuitePro (ActiveX) version 16.2.3

Platform: Windows 7 (32bit)

Language: Visual Basic 6.0 / SP6
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.141 seconds.