` Printed Icetips Article

Icetips Article



Par2: Default delete dialog to "No"
2000-04-02 -- Dennis Evans
 
,

   Override the TakeUser method in the GlobalErrors and before the parent
call add this:

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 ! if message
end ! if Self.Error.Id

You can add tests for other error conditions and use the 'No' default here
or let the parent handle and use the default 'Yes'

One note, this will only work in single exe apps.  If you are developing
multi-dll applications there is a bug in the way the templates generate the
init code and the GlobalErrors are not global.



Printed April 30, 2024, 5:11 am
This article has been viewed/printed 35118 times.