Question on view() ... 
Author Message
 Question on view() ...

I'm trying to implement a method whereby the user inputs a number but the
number has to start with P95-
I tried to use the following code to do this:

newcase="P95-"
        newcase.view("Enter case number:")
        if not Case_Number.locate("Case Number", newcase) then
                msgstop("Error","Case number does not exist!")
                return
        endif

The problem is that when the view box comes up with P95- in it the P95- is
highlighted and any input the user types in erases the P95-. I need the
cursor to sit just to the right of the P95- and not highlight it. Any ideas
on how to do this would be greatly appreciated.

Thankyou,

Adam Patacchiola



Sun, 28 Dec 1997 03:00:00 GMT
 Question on view() ...

Quote:
>I'm trying to implement a method whereby the user inputs a number but the
>number has to start with P95-
>I tried to use the following code to do this:
>newcase="P95-"
>        newcase.view("Enter case number:")
>        if not Case_Number.locate("Case Number", newcase) then
>                msgstop("Error","Case number does not exist!")
>                return
>        endif
>The problem is that when the view box comes up with P95- in it the P95- is
>highlighted and any input the user types in erases the P95-. I need the
>cursor to sit just to the right of the P95- and not highlight it. Any ideas
>on how to do this would be greatly appreciated.

maybe it is too simple, try

Quote:
>temp="1234"       ; can be anything, maybe a a # 1 more than the last one
>        temp.view("Enter case number: P95-...")
>        newcase = "P95-" + newc
>        if not Case_Number.locate("Case Number", newcase) then
>                msgstop("Error","Case number does not exist!")
>                return
>        endif

does this help ...
cpm


Sun, 28 Dec 1997 03:00:00 GMT
 Question on view() ...
Here's something that isn't perfect but it is and improvement

method pushbutton
var
 num string
endvar

num="95-"

while true
 self.settimer(25,false)
 num.view()
 if num.substr(1,3)<>"95-" then
  msgstop("Number","Number must begin with '95-'. Re-enter"
 else
  quitloop
 endif
endwhile

method timer
 sendkeys("{end}") ; check sendkeys() help out!!

Hope this helps

Gene G.



Mon, 29 Dec 1997 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. A question about View

2. Ltrim question/ new view newbie Q

3. Newbie question about Views

4. A question on Views

5. Question on Views

6. Question about View

7. Newbie question on views

8. Question about Views

9. Newbie question - Desktop view

10. Basic Question Regarding View Processing

11. Newbite question on views

12. Newbie Question on View creation


 
Powered by phpBB® Forum Software