Dear all,
I have a dialog with a xBrowse with arrays datasource.
The array has only one single row.
How can I jump directly into edit mode of the first left cell when the dialog opens?
I tried the ON INIT clause when activating the dialog.
But oBrw:aCols[1]:SetFocus() does of course not work.
Anyone who give me a hint?
Jump into edit mode
- FranciscoA
- Posts: 2163
- Joined: Fri Jul 18, 2008 1:24 am
- Location: Chinandega, Nicaragua, C.A.
Re: Jump into edit mode
Algo asi?:
Code: Select all | Expand
//--------------------------------------------//
// BROWSE EN EDICION AL INICIAR EL DIALOG
//--------------------------------------------//
FUNCTION BrwEditIni()
local oCodi,cCodi:=" ", oCodi2,cCodi2:=" ", oDlg, oBrw, aData := {" "," "," "," "}
DEFINE DIALOG oDlg SIZE 540,200 PIXEL TITLE "BRW EN EDICION AL INICIO"
@ 4,10 GET oCodi Var cCodi SIZE 50,10 PIXEL OF oDlg PICTURE "@!"
@ 4,70 GET oCodi2 Var cCodi2 SIZE 50,10 PIXEL OF oDlg PICTURE "@!"
@ 20, 10 XBROWSE oBrw SIZE -10,-10 PIXEL OF oDlg DATASOURCE aData ;
COLUMNS 1,2,3,4 HEADERS "Col1", "Col2", "Col3", "Col4" FASTEDIT
WITH OBJECT oBrw
:nMarqueeStyle := MARQSTYLE_HIGHLCELL
:nEditTypes := { 1, 1, 1, 1 }
:CreateFromCode()
END
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT ( oBrw:SetFocus(), oBrw:nColSel := 1 )
Return nil
Francisco J. Alegría P.
Chinandega, Nicaragua.
Fwxh-MySql-TMySql
Chinandega, Nicaragua.
Fwxh-MySql-TMySql
Re: Jump into edit mode
Yes, it jumps to the first column.
But unfortunately it doesn’t get into edit mode.
Anyhow many thanks for your help, Francisco.
But unfortunately it doesn’t get into edit mode.
Anyhow many thanks for your help, Francisco.
- nageswaragunupudi
- Posts: 10721
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 8 times
- Contact:
Re: Jump into edit mode
Please try:
Code: Select all | Expand
ON INIT ( oBrw:SetFocus(), oBrw:nColSel := 1, oBrw:Edit() )
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Jump into edit mode
Thanks, Mr. Rao.
Unfortunately my FWH version doesn't know the method ::Edit()
Unfortunately my FWH version doesn't know the method ::Edit()
- nageswaragunupudi
- Posts: 10721
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 8 times
- Contact:
Re: Jump into edit mode
Sorry, my mistake.
Try this:
Try this:
Code: Select all | Expand
ON INIT ( oBrw:SetFocus(), oBrw:nColSel := 1, oBrw:aCols[ 1 ]:Edit() )
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India