Results 1 to 4 of 4

Thread: Insert Characters where Mouse is focused

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 1999
    Posts
    33

    Exclamation

    I made a listbox that has characters and other stuff. When
    you double click a character, for example, A, then A would be added to a textbox. The problem that I can't figure out is how to add the character where the The Blinking "|" is. Please help me! Thanks in advance..

    -Matt

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    the textbox should have a selstart property
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  3. #3

    Thread Starter
    Member
    Join Date
    Oct 1999
    Posts
    33

    insertion

    I don't know if thats what the function I need for what I'm
    doing. Heres a little diagram of what I'm doing:

    | = Blinking Insertion Line
    ___________________
    |A...B...C...D...E...F...[G]<-|-----Listbox("G" is Highlighted)
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
    ________________
    |AA|AA.....................<-|
    |________________|\
    ________________...\
    |AAG|AA...............<-|---textbox
    |.................................|
    |______________|

    (Don't mind the periods)
    When the G is doubleclicked, it goes where the blinking insertion point is. Thats what I want done, I can't figure out how its done, or what is needed to do it.

    [Edited by Matthew Howle on 04-30-2000 at 05:39 PM]

  4. #4
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    selstart returns the position of the cursor. For the insertion you need to use left(txtbox,txtbox.selstart) & yourtext & mid(txtbox,txtbox.selstart+1)
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

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