Login
`
Templates, Tools and Utilities
|
||
Add a comment to an Icetips ArticlePlease add your comments to this article.
Please note that you must provide both a name and a valid email address in order
for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!
Back to article list Search Articles Add Comment Printer friendly Direct link Par2: Template modification to change "Ok" to "Delete" when called to delete 1999-03-26 -- Arnor Baldvinsson When a form is called to confirm the delete and you wish to change the text of the Ok
button, you can:
(SHP)
>If ThisWindow.Request = DeleteRecord
> ?DeleteButton{Prop:Text} = ....
>Really, really like it? Put it in your default registry.
or you can modify the templates:
Between lines 142 and 143 in abupdate.tpw:
If Self.Request = DeleteRecord !! AB 27-03-1999
?OK {Prop:Text} = 'Delete' !! AB 27-03-1999
End !! AB 27-03-1999
Then it should look like:
#AT(%WindowManagerMethodCodeSection,'Init','(),BYTE'),PRIORITY(8500)
#FOR(%Control)
#IF(UPPER(EXTRACT(%ControlStatement,'STD',1))='STD:HELP')
ToolBarForm.HelpButton=%Control
#BREAK
#ENDIF
#ENDFOR
If Self.Request = DeleteRecord !! AB 27-03-1999
?OK {Prop:Text} = 'Delete' !! AB 27-03-1999
End !! AB 27-03-1999
SELF.AddItem(ToolbarForm)
#ENDAT
Seems to work - use at own risk;)
Amended 27 March:
Personally I'd rather put it in an extension template. Something
like:
#TEMPLATE(ABCExtensions,'My ABC extion stuff'),FAMILY(ABC)
#EXTENSION(ABCSetDeleteButtonOnForms,'Replace text on Delete button')
#AT(%WindowManagerMethodCodeSection,'Init','(),BYTE'),PRIORITY(8500)
If Self.Request = DeleteRecord !! AB 27-03-1999
?OK {Prop:Text} = 'Delete' !! AB 27-03-1999
End !! AB 27-03-1999
#ENDAT
Then you don't have to remember to modify TS templates when they
release a new patch which updates the template chain.
Fernando Cerini adds:
> ?OK {Prop:Text} = 'Delete' !! AB 27-03-1999
Is better:
SELF.OkControl{Prop:Text} = 'Delete'
Today is November 23, 2024, 3:28 am This article has been viewed 35204 times.
|
|