Results 1 to 2 of 2

Thread: is creating keypress event in propertygrid possible?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,168

    is creating keypress event in propertygrid possible?

    What I'm trying to do is this:

    In the propertygrid, there are two properties (lets call them propA and propB). What I want it to do is when I input a character into propA, I want it to be copied IMMEDIATELY to propB. For each keypress, i want it to be copied into propB without having to change the focus. As I type into propA, it will be typing it into propB as well, basically.

    I've tried ProcessKeyPreview, but the way I've coded it, anything I put in propB gets deleted. Perhaps there is a better way of coding? or different approach instead of ProcessKeyPreview?

    Note: I've tried it with subclassing using NativeWindow, AND using win32 APIs, but no success.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: is creating keypress event in propertygrid possible?

    The more logical approach would be to have the underlying object whose properties you're displaying do it.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width