` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please 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!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

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 May 2, 2024, 11:12 pm
This article has been viewed 35115 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: