Jump to content
Fivewin Brasil

DBCombo - Resolvido


Valdir

Recommended Posts


/*
Program : DBC1.PRG
Purpose : Test DBCombo
Notes :
*/

#include "fivewin.ch"
#include "dbcombo.ch"


function main()

local oDlg, oDBC1, oDBC2, cVar, oCust, cStateID:="CA", oBtn, cState:=" "
local cDept:= "200", oStates, aItems, aList
field NAME

if file("states.dbf")
use states
index on upper(NAME) to temp
database oStates
else
msgInfo("File states.dbf not found.")
endif

define dialog oDlg

@ 10,30 dbcombo oDBC1 var cStateID of oDlg;
alias oStates:cAlias;
size 100,200 pixel;
itemfield "CODE" ;
listfield "NAME";
update;

aList:= {"Accounting","HR","Marketing","Production","Research","Shipping","Sales"}

aItems:= {"100","200","400","300","600","500","700"}

@ 30,30 DBCOMBO oDBC2 VAR cDept;
items aItems;
size 100,200 pixel;
list aList;
of oDlg;
update


@ 50, 50 button oBtn prompt "Selected";
of oDlg pixel ;
action msgInfo( "cStateId: " +cStateID +CRLF+"DeptNo: "+cDept,"Selected" );
default

activate dialog oDlg center;

ferase("temp.ntx")

return nil

// EOF


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...