Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Clipper > Tbrowse help.
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 3817 of 3902
Post > Topic >>

Tbrowse help.

by vmk1508@[EMAIL PROTECTED] Jan 12, 2008 at 07:14 AM

Dear All,

I am using Clipper 5.01 with Rtlink.

I am using the following Tbrowse routine in my program.

Tbrowse program,

**********************************************************************
Function Dblist()

Private mb,key,Mtype,Mdata
Store spac(2) to Mtype
Store spac(30) to Mdata

save scre to Dblsscr

Sele 1
use Party inde Party shared readonly

@[EMAIL PROTECTED]
 05,10 clea to 22,75
@[EMAIL PROTECTED]
 05,10 to 22,75 double
mb := Tbrowsedb(06,11,21,74)

mb :colsep  = ' '+chr(179)+' '
mb :headsep = chr(205)
mb :footsep = chr(205)

mb :addcolumn(Tbcolumnnew('Pt. Code',  {||1 -> Pt_code  }))
mb :addcolumn(Tbcolumnnew('Party Name',{||1 -> Pt_name  }))
mb :addcolumn(Tbcolumnnew('Party Addr',{||1 -> Pt_add1  }))
mb :addcolumn(Tbcolumnnew('Party Addr',{||1 -> Pt_add2  }))
mb :addcolumn(Tbcolumnnew('Party Addr',{||1 -> Pt_add3  }))
mb :addcolumn(Tbcolumnnew('Party Addr',{||1 -> Pt_add4  }))
mb :addcolumn(Tbcolumnnew('Party Addr',{||1 -> Pt_stat  }))
mb :addcolumn(Tbcolumnnew('Party Addr',{||1 -> Pt_pin   }))
mb :addcolumn(Tbcolumnnew('Party Phone',{||1 -> Pt_phone }))
mb :addcolumn(Tbcolumnnew('Party Lst No.',{||1 -> Pt_tngst }))
mb :addcolumn(Tbcolumnnew('Party Cst No.',{||1 -> Pt_cst }))
mb :addcolumn(Tbcolumnnew('Party Frm No.',{||1 -> Pt_frmno }))
mb :addcolumn(Tbcolumnnew('Party Ordno.',{||1 -> Pt_ordno }))
mb :addcolumn(Tbcolumnnew('Party Ordsl.',{||1 -> Pt_ordsl }))
mb :addcolumn(Tbcolumnnew('Party Ordno.',{||1 -> Pt_ordno1 }))
mb :addcolumn(Tbcolumnnew('Party Ordslo.',{||1 -> Pt_ordsl1 }))

Messag('Use Arrow Keys To Navigate Or Press Esc')
do while (key:=inkey()) != 27
   ol_autoyield(.t.)
   if !mb: Stable
      do while !(Mb:Stabilize())
         ol_autoyield(.t.)
 	      if inkey() != 0
            Keyboard chr(Lastkey())
   	      exit
       	 endif
      enddo
   endif
   key = inkey(0)

   do case
      case Key = ENTER
	        Exit

      case Key = ESC
	        Exit

      case Key = LEFT
	        Mb:left()

      case Key = SHFTAB
	        Mb:left()

      case Key = TAB
	        Mb:right()

      case Key = RIGHT
	        Mb:right()

      case Key = UP
	        if !(Mb:Hittop)
	           Mb:up()
	        else
	           tone(600)
	        endif

      case Key = DOWN
	        if !(Mb:Hitbottom)
	           Mb:down()
	        else
	           tone(600)
	        endif

      case Key = CTRL_RIGHT
	        Mb:panend()

      case Key = CTRL_LEFT
	        Mb:panhome()

      case Key = HOME
	        Mb:Panleft()

      case Key = END
	        Mb:Panright()

      case key = F2
	        Swapcol()

      case Key = PGDN
	        if !(Mb:Hitbottom)
	           Mb:pagedown()
	        else
	           tone(600)
	        endif

      case Key = PGUP
	        if !(Mb:Hittop)
	           Mb:pageup()
	        else
	           tone(600)
	        endif

       case Key = CTRL_PGUP
	         if !(Mb:hittop)
	            Mb:gotop()
	         else
	            tone(600)
	         endif

       case Key = CTRL_PGDN
	         if !(Mb:hitbottom)
	            Mb:gobottom()
	         else
	            tone(600)
	         endif

   endcase
enddo

Rest scre from Dblsscr
Return Nil
*********************************************************************
Function Swapcol()

Private cur_col,C_obj_1,C_obj_2
Cur_col = mb:colpos
C_obj_1 = mb:getcolumn(1)
C_obj_2 = mb:getcolumn(mb:colpos)
mb:setcolumn(1,C_obj_2)
mb:setcolumn(Cur_col,C_obj_1)

Return Nil
*********************************************************************

The function is called when ever required.

I want to use for while condition in the above routine. Please suggest
me with a sample program or modification in this routine. My record
size is 7000+.

Also pl. inform me how to use colors in the Tbrowse windows (If a
conditions meets then it should be in a color).

Thanks & Regards for the help well in advance.


V.Mahesh Kumar.




 4 Posts in Topic:
Tbrowse help.
vmk1508@[EMAIL PROTECTED]  2008-01-12 07:14:44 
Re: Tbrowse help.
"Stephen Quinn"  2008-01-13 02:36:52 
Re: Tbrowse help.
sebas22 <nospam@[EMAIL  2008-01-13 08:37:38 
Re: Tbrowse help.
sebas22 <nospam@[EMAIL  2008-01-13 08:41:03 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon May 12 3:52:53 CDT 2008.