Results 1 to 8 of 8

Thread: Instr function?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2000
    Location
    Virginia Beach
    Posts
    66

    Smile

    If you have a string and wanted to use the instr(?) function to go through and on each instance it finds a certain word, that word is made bold, how would you do this?
    Sorry if this is really simple and not much of a challenge!
    Cady

  2. #2
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Nitro
    Posts
    633
    I could be wrong about this but I think you have to use a richtext box to check for the BOLD.
    Chemically Formulated As:
    Dr. Nitro

  3. #3
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    What are you using? Richtextbox control?
    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.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Mar 2000
    Location
    Virginia Beach
    Posts
    66
    No, I then add the string to a list box, and just realized that this probably won't work, listboxes don't support that(bold,itallic etc.) do they?
    Cady

  5. #5
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    What do you need to bold a word if you put all words in a listbox?
    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.

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Mar 2000
    Location
    Virginia Beach
    Posts
    66
    Kedaman, do you mean why do I need to bold the word if it's in a listbox? Because I put the whole sentence in the listbox and the bold word is a keyword, I want it bold, or a different color or something like that, so it's odvious when you glance at it. Just like when you do a search on Yahoo or something and the keyword you searched for appears highlighted or a different color in the results. I used a listbox instead of a rich text box because I will be adding to it continuously(sp?) it has it advantages, but now I am seeing where a RTB would have advatages too.
    Cady

  7. #7
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221

    Arrow

    Ok, first, you can't bold a certain word in listbox.

    1. You could make a richtextbox act like a listbox, but thats the hard way
    2. You could make your own listboxcontrol, hard but cool
    3. You could make those words ucase, easy way but not so cool
    4. You could give a **** about it. If you don't have too large sentences
    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.

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Mar 2000
    Location
    Virginia Beach
    Posts
    66

    Thumbs up

    Unfortunetly i have to give a **** about it because it's what the user wants, one of many, many things he wants! He is a HUGE pain in the ass! Anyway ucase will work if nothing else can, not as cool but functional, do you know how I go about doing it, would just do trial and error, however I have 1 hour to get this all done!!!!! Thanks for your help.
    Cady

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