Changing focus on a dialog.

Changing focus on a dialog.

Postby HunterEC » Wed May 13, 2009 4:48 pm

I have 2 buttons and a checkbox in a dialog. The 1st button is for printing. Users mistakenly press ENTER and the print preview comes up. How can I display the dialog and change the focus to the checkbox or have the focus elsewhere ?
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: Changing focus on a dialog.

Postby sambomb » Wed May 13, 2009 9:00 pm

If you use Resource, you can designate with Pelles the taborder, the first in the taborder that can be focused will receive the initial focus

You can change the focus no the init of the dialog too,

Code: Select all  Expand view

Define Dialog etc...

Active Dialog oDialog On Init oCheckBox:SetFocus()
 
Email: SamirSSabreu@gmail.com
xHarbour 1.2.3 + Fwhh 20.2
User avatar
sambomb
 
Posts: 388
Joined: Mon Oct 13, 2008 11:26 am
Location: Itaocara - RJ - Brasil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 85 guests