Login
`
Templates, Tools and Utilities
|
||
Icetips Article
Back to article list
Search Articles
Add Comment
Printer friendly
Direct link
ABC: Return use variable for entry controls 1999-02-05 -- Jon Waterhouse Newsgroups: comp.lang.clarion
If you have the history enabled on the form this should be possible. Below
is a window manager method I wrote to return the label of a the use variable
of a given control. You should be able to modify this to do what you want
(which is to return the field number of a given use label). My first attempt
is given below.
WindowManager.GetFieldLabel PROCEDURE(SIGNED Control)
Left ANY
CODE
IF ~SELF.History &= NULL
SELF.History.Control = Control
GET(SELF.History,SELF.History.Control)
IF ~ERRORCODE()
return(SELF.Primary.Me.File{prop:label,SELF.History.FieldNo})
END
END
WindowManager.GetFieldByLabel PROCEDURE(STRING UseLabel)
Left ANY
CODE
IF ~SELF.History &= NULL
loop i# = 1 to records(self.history)
get(self.history,i#)
if SELF.Primary.Me.File{prop:label,SELF.History.FieldNo}=UseLabel
return(SELF.History.Control)
end
END
END
Today is November 21, 2024, 3:39 am This article has been viewed 35374 times. Google search has resulted in 11 hits on this article since January 25, 2004.
|
|