You can't set focus on to an individual control by ID - the way MapBasic
works is that when a dialog appears for the first time the focus is onto the
first control in the list within your dialog statement. The user can then
TAB through the controls in the order they appear in the statement. So if
you want a default button to be activated when the user hits return it
should be the first control statement.

You can use the control code handlers to activate/hide/show controls on the
basis of user actions. 

There are clever bits of software around which make writing MB dialogs
easier - see other postings on this site - but the sort of interaction you
get with MB dialogs is not as powerful as with VB, C++ etc. If this is a big
problem  - for example if you're writing an app with heavy-duty forms
interaction - you should probably use integrated mapping or even MapX.

HTH

Paul Crisp
Syntegra

Direct:  0191 461 4522 
Mobile: 0776 414 3762
Fax: (0191) 461 1959

Innovation Place Metro Riverside Park
Delta Bank Road Gateshead Tyne & Wear NE11 9DJ


-----Original Message-----
From: Eagle, David A [mailto:[EMAIL PROTECTED]]
Sent: 16 January 2002 09:11
To: 'MapInfo-L'
Subject: MI-L Button Focus


Listers,

Does anyone know if in MapBasic there is any consistent way of giving
Buttons created in a Dialogs the 'Focus' (if the return key is pressed that
button is activated). I have a number of Buttons in my dialog including an
OKButton. The OKButton is disabled to begin with so I want the focus on one
of the other Buttons...

I thought at first it was to do with the ID No. i.e. the Button with the
highest ID No. had the focus, this seems not to be the case!

Any ideas?

Best Regards,
David


----------------------------------------------
David A. Eagle
(GIS Consultant)

WS Atkins Consultants Ltd
Stafford Park 13, Telford
TF3 3AZ, Great Britain
Tel:  +44 (0)1952 20 1234
Fax: +44 (0)1952 20 0981

Email: [EMAIL PROTECTED]
Web: < www.wsatkins.com <www.wsatkins.com>  >



This email and any attached files are confidential and copyright protected.
If you are not the addressee, any dissemination of this communication is
strictly prohibited. Unless otherwise expressly agreed in writing, nothing
stated in this communication shall be legally binding.




_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.


********************************************************************

This email may contain information which is privileged or confidential. If you are not 
the intended recipient of this email, please notify the sender immediately and delete 
it without reading, copying, storing, forwarding or disclosing its contents to any 
other person
Thank you

Check us out at http://www.syntegra.com

********************************************************************



_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.

Reply via email to