DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Preventing default value from being highlighted

  1. #1
    Join Date
    Aug 2000
    Posts
    462
    I have set some text item properties to have initial values. However, when the user navigates into that item, the initial value is highlighted. In my application, the initial value is only part of the data required in that field. For example, one field is an ID. The ID usually begins with "A", so I have set the initial value to "A", to remove one keystroke.

    How can I prevent this value from being highlighted?

    [Edited by kmesser on 03-05-2001 at 04:01 PM]

  2. #2
    Join Date
    Sep 2000
    Location
    Sao Paulo,SP,Brazil, Earth, Milky Way
    Posts
    350
    ANY text-item, when receive the focus in entrance, WILL be highlighted by default, IF you are navigating by keyboard. An option maybe can be : have a non-base table display item with the non-enterable part of the field, leaving just the enterable part in a normal non-base text-item, and behind the scenes (maybe in xx-COMMIT triggers) concat the fields in the non-visible original base-table text-item

    []s
    Chiappa

  3. #3
    Join Date
    Aug 2000
    Posts
    462
    So far, this is what I've done:

    1. Eliminated the initial value;
    2. Edited my WHEN-VALIDATE-ITEM trigger to analyze the ID entered. If it begins with a letter, I do not prepend the 'A', otherwise, I do.

    Thus, when the user moves the focus to another item, the trigger fires and correctly adjusts the ID if needed.

    Any comments about this solution?

    Thanks!


  4. #4
    Join Date
    Sep 2000
    Location
    Sao Paulo,SP,Brazil, Earth, Milky Way
    Posts
    350
    I think that the main issue, here, is : without a default/initial value, the field will be blank, and the end-user will NOT get any hint about the value, and he/she will lost the capacity of accept the default value with an ENTER - ALLWAYS the value must be typed (or populated with triggers). If it is OK to the user, go ahead.

    []s
    Chiappa

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