Scrolling TextBox with HardwareKeys

Discussion in 'Questions (Windows Mobile)' started by Elrick, Apr 16, 2008.

  1. Elrick

    Elrick Member Licensed User

    Hello! Is there a way to scroll text in TextBox with Up and Down keys?
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Are you referring to a single line textbox or multiline textbox?
     
  3. Elrick

    Elrick Member Licensed User

    I'm using a multiline textbox. I want to scroll large text in it by pressing hardware keys and not by moving scrollbar :sign0085:
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    If the textbox is focued then pressing the up/down keys should scroll the text.
     
  5. Elrick

    Elrick Member Licensed User

    Not absolutely so. It scroll the caret, not the text. And yes, when the caret is in bottom of the TextBox, text will scroll. But if i need to scroll text up, i'll have to move caret from the bottom to the top. And the caret's blinking is so annoying:) But i want to make something like...err...text reader, where the text will scroll line-by-line by pressing HardwareKey. I use TextBox instead of something different because i need to copy\paste text.
     
    Last edited: Apr 16, 2008
  6. Erel

    Erel Administrator Staff Member Licensed User

    A better solution will be available in a day or two.
     
  7. Erel

    Erel Administrator Staff Member Licensed User

    Using the new SendMessageToControl method of the updated Hardware library you can send scroll messages to the textbox.
    First download it here: http://www.basic4ppc.com/forum/showthread.php?t=2154

    I've used 4 buttons: PageUp, PageDown, LineUp, LineDown
    You could use a HardKey object to catch the hardware buttons and then send the scroll message.
     

    Attached Files:

  8. Elrick

    Elrick Member Licensed User

    Erel, this is exactly what i need! Thank you! And it's a nice joke with text to scroll in demo :):)
    And another question - where can i find the description of all system messages ?
     
    Last edited: Apr 17, 2008
  9. Elrick

    Elrick Member Licensed User

    Last edited: Apr 17, 2008
Loading...