Results 1 to 15 of 15
  1. #1
    Join Date
    Jan 2004
    Posts
    8

    Unanswered: Selection in a textbox

    Hi there!

    I'm wondering if it's possible with pl/sql to do this. I just wanna select part of a textbox. Let's say that the textbox contains 'Evil' i wanna select just the 'vil' or the 'il' is that possible??

    Thanks in advance!

    Adagar

  2. #2
    Join Date
    Jan 2004
    Location
    North Haven, CT
    Posts
    110

    Re: Selection in a textbox

    Originally posted by Adagar
    Hi there!

    I'm wondering if it's possible with pl/sql to do this. I just wanna select part of a textbox. Let's say that the textbox contains 'Evil' i wanna select just the 'vil' or the 'il' is that possible??

    Thanks in advance!

    Adagar
    use substr function

  3. #3
    Join Date
    Jan 2004
    Posts
    8
    this function exist in pl/sql??

  4. #4
    Join Date
    Jan 2004
    Location
    North Haven, CT
    Posts
    110
    Originally posted by Adagar
    this function exist in pl/sql??
    Did you try:

    select substr('Adagar',3,4) from dual


    gives you
    agar

  5. #5
    Join Date
    Jan 2004
    Posts
    8
    but is there a way to have it selected in the textbox??

    Ad[agar]

    [is the selected text]

  6. #6
    Join Date
    Jan 2004
    Posts
    8
    What i'm actualy trying to do is an auto-completion...when the user type C, the word Computer appears....but i want to have the omputer selected so that if the user write a after the C, the next word appearing would be Card....with the rd selected...

  7. #7
    Join Date
    Jan 2004
    Location
    North Haven, CT
    Posts
    110
    Originally posted by Adagar
    What i'm actualy trying to do is an auto-completion...when the user type C, the word Computer appears....but i want to have the omputer selected so that if the user write a after the C, the next word appearing would be Card....with the rd selected...
    What front end interface are you using? Forms?

  8. #8
    Join Date
    Jan 2004
    Posts
    8
    yeah froms in dev2000

  9. #9
    Join Date
    Jan 2004
    Location
    North Haven, CT
    Posts
    110
    Originally posted by Adagar
    yeah froms in dev2000
    I assume you have a list of words (dictionary) to choose from.

    You also might need some mechanism to do auto completion, such as
    a timer/clock.

    if you are using timer, you can put the following codes into
    when-timer-expired trigger:

    select substr(column_name, length(:text_field)+1, length(column_name) - length(:text_field)
    from tab_dictionary
    where column_name like :text_field||'%'
    and rownum = 1;

  10. #10
    Join Date
    Jan 2004
    Location
    North Haven, CT
    Posts
    110
    I forgot to put extra quotes in the like

  11. #11
    Join Date
    Jan 2004
    Posts
    8
    but with these lines of coding, it'll give me the last letters of the word i want, but the problem is to select them in the textbox...

  12. #12
    Join Date
    Jan 2004
    Location
    North Haven, CT
    Posts
    110
    Originally posted by Adagar
    but with these lines of coding, it'll give me the last letters of the word i want, but the problem is to select them in the textbox...
    What do you mean by text box? Is it an item? If yes,
    do an assignment.

  13. #13
    Join Date
    Jan 2004
    Posts
    8
    the name of my textbox is LsDept

    by assignment do you mean:

    :lsDept:='the answer gotten from the select'

    if it's the case

    in :lsDept there was at first 'Adagar'

    if i do the assigment it's gonna leave me with 'agar' in lsDept...but i still need the 'Ad' before the 'agar'

    select agar in adagar, that's what i need in my textbox...so if the user write an other letter, the 'Ad' will remain there and the 'agar' will be replace with what the user juste typed!

  14. #14
    Join Date
    Jan 2004
    Location
    North Haven, CT
    Posts
    110
    Originally posted by Adagar
    the name of my textbox is LsDept

    by assignment do you mean:

    :lsDept:='the answer gotten from the select'

    if it's the case

    in :lsDept there was at first 'Adagar'

    if i do the assigment it's gonna leave me with 'agar' in lsDept...but i still need the 'Ad' before the 'agar'

    select agar in adagar, that's what i need in my textbox...so if the user write an other letter, the 'Ad' will remain there and the 'agar' will be replace with what the user juste typed!
    You can either use an additional field to manipulate, or you just select the whole word into that text field, and add some mechanism to mark the field changed or not. If the user changed the field, then pupulate the new word into it, otherwise, old word remains.

  15. #15
    Join Date
    Jan 2004
    Posts
    8
    thanks for your help...i'll try to do my best with what you gave me, but it's a really good start..thanks a lot!!

Posting Permissions

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