FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Changing focus on a dialog.
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Changing focus on a dialog.
Posted: Wed May 13, 2009 04: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 ?

Posts: 389
Joined: Mon Oct 13, 2008 11:26 AM
Re: Changing focus on a dialog.
Posted: Wed May 13, 2009 09: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 (fw): Select all Collapse
Define Dialog etc...

Active Dialog oDialog On Init oCheckBox:SetFocus()
Email: SamirSSabreu@gmail.com
xHarbour 1.2.3 + Fwhh 20.2

Continue the discussion