Running controls.prg example

Running controls.prg example

Postby Antonio Linares » Thu May 04, 2017 4:11 am

In order to test FiveTouch samples\controls.prg example, please download this DBF from the Android or iOS device:

https://bitbucket.org/fivetech/fivetouch-public-repository/downloads/test.dbf

Simply click on the above URL from your Android or iOS web navigator. Then modify controls.prg this way:

USE ( DownloadLocation() + "/test" )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Running controls.prg example

Postby Antonio Linares » Thu May 04, 2017 5:04 am

Enhanced controls.prg example:
Code: Select all  Expand view
#include "FiveTouch.ch"

#define COL1 9

function Main()

   local oDlg, oSay
   local oGet, cName := ""
   local oCbx, cItem := "Item 1"
   local oLbx, cLbxItem := "Item 2"
   local oChk, lVar := .T.
   local oSlide, nVar := 1
   local oTV, oFolder
   local oBtnOk, oBtnCancel
   local nRow := ScreenHeight() / 20
   local nCol := ScreenWidth() / 60
   
   DEFINE DIALOG oDlg TITLE "A Dialog with controls" ;
      SIZE ScreenWidth(), ScreenHeight()

   @ nRow,  nCol SAY oSay PROMPT "Get" OF oDlg

   @ nRow, nCol * COL1 GET oGet VAR cName OF oDlg SIZE 150, 30

   @ nRow * 2,  nCol SAY oSay PROMPT "ComboBox" OF oDlg

   @ nRow * 2, nCol * COL1 COMBOBOX oCbx VAR cItem OF oDlg ;
             SIZE 150, 30 ;
             ITEMS { "Item 1", "Item 2", "Item 3" }

   @ nRow * 3,  nCol SAY oSay PROMPT "ListBox" OF oDlg

   @ nRow * 3, nCol * COL1 LISTBOX oLbx VAR cLbxItem OF oDlg ;
             SIZE 150, 150;
             ITEMS { "Item 1", "Item 2", "Item 3" }

   @ nRow * 7,  nCol SAY oSay PROMPT "CheckBox" OF oDlg

   @ nRow * 7, nCol * COL1 CHECKBOX oChk VAR lVar OF oDlg ;
              PROMPT "Test"

   @ nRow * 8,  nCol SAY oSay PROMPT "Slider" OF oDlg

   @ nRow * 8.3, nCol * COL1 SLIDER oSlide VAR nVar OF oDlg ;
              SIZE 150, 20 HORIZONTAL

   @ nRow * 9,  nCol SAY oSay PROMPT "TreeView" OF oDlg

   @ nRow * 9, nCol * COL1 TREEVIEW oTV OF oDlg ;
              SIZE 150, 150

   @ nRow * 13, nCol SAY oSay PROMPT "Folder" OF oDlg

   @ nRow * 13, nCol * COL1 FOLDER oFolder OF oDlg ;
              SIZE 150, 150 ;
              PROMPTS "Tab 1", "Tab 2", "Tab 3"

   USE ( DownloadLocation() + "/test" )

   @ nRow, nCol * 20 SAY oSay PROMPT "Browse" OF oDlg

   @ nRow, nCol * 26 BROWSE oBrw OF oDlg ;
             SIZE 600, 600 ;
             HEADERS "FIRST", "LAST" ;
             FIELDS FIELD -> first, FIELD -> last

   @ nRow * 18, nCol * 20 BUTTON oBtnOk PROMPT "Ok" OF oDlg SIZE 100, 50 ;
             ACTION ( MsgInfo( cName ),;
                      MsgInfo( cItem ),;
                      MsgInfo( lVar ) )

   @ nRow * 18, nCol * 28 BUTTON oBtnCancel PROMPT "Cancel" OF oDlg ;
              ACTION oDlg:End() SIZE 100, 50

   ACTIVATE DIALOG oDlg CENTERED
   
   USE 
   
return nil
 


Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveTouch

Who is online

Users browsing this forum: No registered users and 1 guest