` Making the No button default on deletes (Rick Martin) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Icetips Article

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

ABC: Making the No button default on deletes
1998-07-07 -- Rick Martin
 
Newsgroups: topspeed.products.c4 > Could anyone tell me how to force the default button > of the Confirm Delete dialog to No. You need to override the ErrorClass and change your application to use your new class. Here is the Class definition I use to accomplish the same thing. Put this into an include file in your LibSrc directory (I use SHError.INC and SHError.CLW): !ABCIncludeFile OMIT('_EndOfInclude_',_SharpeErrorPresent_) _SharpeErrorPresent_ EQUATE(1) INCLUDE('aberror.inc') SharpeError CLASS(ErrorClass),TYPE,MODULE('SHERROR.CLW'), | LINK('SHERROR.CLW',_ABCLinkMode_),DLL(_ABCDllMode_) TakeUser PROCEDURE,BYTE,VIRTUAL,PROC,PROTECTED END _EndOfInclude_ Put this code in a source file in your LibSrc MEMBER MAP . INCLUDE('SHERROR.INC') ! We want to override Take user and make No the default for confirm delete SharpeError.TakeUser PROCEDURE CODE If Self.Errors.ID = Msg:ConfirmDelete IF MESSAGE(Self.SubsString(),Self.Errors.Title,ICON:Question, | Button:Yes+Button:No,BUTTON:No,0) = Button:Yes RETURN Level:Benign ELSE RETURN Level:Cancel END Else Return Parent.TakeUser() End HTH, Rick


Today is April 19, 2024, 11:08 pm
This article has been viewed 35110 times.
Google search has resulted in 14 hits on this article since January 25, 2004.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: