Resulta que los gets que siguen a un dbcombo tienen un when que depende del valor del dbcombo, pero al tratar de moveme con TAB el when sigue en .F.
El problema se ocasiona al perder el foco, aparentemente no se ha asignado la variable del dbcombo en el momento de evaluarse el when de los gets siguientes para posicionar el cursor.
Esto está compilado con FWH 11.05 y Harbour.
- Code: Select all Expand view
/*
* Proyecto: probcombo
* Fichero: prueba.prg
*/
#include 'FiveWin.ch'
#include 'dbcombo.ch'
Function Main()
local oDlg, oDBC1, oDBC2, oCust, oBtn
local cDept:= space(3), oStates, aItems, aList
local cVar, cVar2
cVar:= 'Only with HR selected'
cVar2:= 'just Marketing'
define dialog oDlg size 600, 200 title 'use <tab> only'
aList:= {"Accounting","HR","Marketing","Production","Research","Shipping","Sales"}
aItems:= {"100","200","300","400","500","600","700"}
@ 10,30 DBCOMBO oDBC2 VAR cDept;
items aItems;
size 100,200 pixel;
list aList;
of oDlg;
update
@ 30, 30 get cVar PIXEL of oDlg WHEN cDept == '200' UPDATE
@ 50, 30 get cVar2 PIXEL of oDlg WHEN cDept == '300' UPDATE
@ 70, 50 button oBtn prompt "Selected";
of oDlg pixel ;
action msgInfo( "DeptNo: "+cDept,"Selected" );
default
activate dialog oDlg center;
ferase("temp.ntx")
return nil
Return NIL