[Gambas-user] Re:Message Box Default Button

j. riolex pinuela jriolexp at ...43...
Fri Jan 27 15:07:32 CET 2006



Rohnny Stormo <rohnny at ...1248...> wrote: You should use default.

Button1.Text ="Hello"
Button1.Enabled = True
Button1.Default = True


But if your looking for tabindex there is'nt any. You need to delete the 
items and then create them allover :[
Hopefully it will come in a later version.


-- 
-----------------------------------------
Gambas brings Basic to Linux.
My Gambas Community http://forum.stormweb.no


Thanks everybody for such a prompt reply. Anyway to clarify things, I am refering to Message class, that is, for example, Message.Delete. I have to rearrange  the button so that it will be [NO] [YES] while on Message.Question it would be [YES] [NO] arrangement.
 Let face it, user sometimes get the nasty habit of pressing enter key, while others just clicking mouse button at the location they are used to without even reading the label on a message box.
   
 I am currently working on a simple work around this issue:
 In Module1
 PUBLIC iMsgBoxValue as Integer
   
 In Message Form button event
 PUBLIC Sub Buttin1_Click()
 ' yes button
     Module1.iMsgBoxValue=1
     Me.Close
 END
   
 PUBLIC Sub Buttin2_Click()
 ' no button - default
     Module1.iMsgBoxValue=2
      Me.Close
  END
   
 In  main  form:
     ...
     frmMessage.Showmodal
     IF iMsgBoxValue=1 then
        dothis
     ELSEIF iMsgBoxValue=2 then
        dothat
    ENDIF
   
 This is a crude work around but it can work. Hope this can help. Things could be simpler though.
   
 One more thing: DateAdd does not seem to work on version 1.0.13. I get "Unknown Identifier: DateAdd" error. 
 
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Gambas-user mailing list
Gambas-user at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user



		
---------------------------------
 
 What are the most popular cars? Find out at Yahoo! Autos 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20060127/bed0d244/attachment.html>


More information about the User mailing list