ComboBox en xBrowse

ComboBox en xBrowse

Postby Armando » Thu Jun 03, 2021 3:31 am

Amigos foreros:

Algún ejemplo de un ComboBox en xBrowse?

Gracias
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
Armando
 
Posts: 3201
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: ComboBox en xBrowse

Postby leandro » Thu Jun 03, 2021 12:51 pm

Armando buenos días, como estas?

Fragmento de codigo testxbrw.prg
Code: Select all  Expand view

STATIC FUNCTION ArrayEdit( oWnd )

   local oChild, oBrw, oCol, n
   local aStruc

   DEFINE WINDOW oChild TITLE "DBF structrure with edition & no scroll bars" MDICHILD OF oWnd


   aStruc := DBStruct()
   Aeval( aStruc, {|v| v[1] := Padr( v[1], 10 ) } )

/*
   oBrw := TXBrowse():New( oWnd )

   oBrw:SetArray( aStruc)

   oBrw:nColDividerStyle := LINESTYLE_BLACK
   oBrw:nRowDividerStyle := LINESTYLE_BLACK

   oBrw:aCols[1]:cHeader      := Padr("NAME", 15)
   oBrw:aCols[1]:cEditPicture := "@K !!!!!!!!!!"
   oBrw:aCols[1]:bClrEdit     := oBrw:bClrStd
   oBrw:aCols[1]:bOnPostEdit  := {|o,x| aStruc[ oBrw:nArrayAt, 1 ] := x }
   oBrw:aCols[1]:nEditType    := EDIT_GET

   oBrw:aCols[2]:cHeader        := "TYPE"
   oBrw:aCols[2]:nDataStrAlign  := AL_CENTER
   oBrw:aCols[2]:nHeadStrAlign  := AL_CENTER
   oBrw:aCols[2]:nEditType      := EDIT_GET_LISTBOX
   oBrw:aCols[2]:aEditListTxt   := {"C", "N", "D", "L", "M"}
   oBrw:aCols[2]:bOnPostEdit    := {|o,x| aStruc[ oBrw:nArrayAt, 2 ] := x }
   oBrw:aCols[2]:aEditListBound := {"C", "N", "D", "L", "M"}
   oBrw:aCols[2]:bClrEdit       := oBrw:bClrStd

   oBrw:aCols[3]:cHeader       := "SIZE"
   oBrw:aCols[3]:nDataStrAlign := AL_RIGHT
   oBrw:aCols[3]:nHeadStrAlign := AL_RIGHT
   oBrw:aCols[3]:nEditType     := EDIT_GET_BUTTON
   oBrw:aCols[3]:bOnPostEdit   := {|o,x| aStruc[ oBrw:nArrayAt, 3 ] := x }
   oBrw:aCols[3]:bEditBlock    := {|| Msginfo("Your code goes here ...", "TXBrowse power" ) }

   oBrw:aCols[4]:cHeader       := "LENGTH"
   oBrw:aCols[4]:nDataStrAlign := AL_RIGHT
   oBrw:aCols[4]:nHeadStrAlign := AL_RIGHT
   oBrw:aCols[4]:bOnPostEdit  := {|o,x| aStruc[ oBrw:nArrayAt, 4 ] := x }
   oBrw:aCols[4]:nEditType    := EDIT_GET

*/


   @ 0,0 XBROWSE oBrw OF oChild ;
      HEADERS "Name", "Type", "Len", "Dec", "Ext" ;
      JUSTIFY .F., AL_CENTER, .T., .T., .T. ;
      COLSIZES 80,60 ;
      ARRAY aStruc AUTOCOLS

   for n := 1 to Len( oBrw:aCols )
      oCol  := oBrw:aCols[ n ]
      if n == 2
         oCol:nEditType := EDIT_GET_LISTBOX
         oBrw:aCols[2]:aEditListTxt   := {"Charcter", "Numeric", "Date", "Logical", "Memo"}
         oBrw:aCols[2]:aEditListBound := {"C", "N", "D", "L", "M"}
      else
         oCol:nEditType := EDIT_GET
      endif
      oCol:bOnPostEdit := { |o,x,n| If( n != VK_ESCAPE, oBrw:aRow[o:nArrayCol] := x, ) }
   next


   oBrw:nMarqueeStyle   := MARQSTYLE_HIGHLCELL

   oBrw:lHScroll := .f.
   oBrw:lVScroll := .f.
   oBrw:lFastEdit:= .t.

   oBrw:CreateFromCode()

   oChild:oClient := oBrw

   ACTIVATE WINDOW oChild ON INIT oBrw:SetFocus()

RETURN NIL
 
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1669
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: ComboBox en xBrowse

Postby Armando » Thu Jun 03, 2021 8:41 pm

Leandro:

Muchas gracias. Por cierto ¿Cómo sigue tu tío?, espero que mucho mejor.

Saludos
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
Armando
 
Posts: 3201
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: ComboBox en xBrowse

Postby leandro » Thu Jun 03, 2021 10:57 pm

De nada amigo

Gracias a Dios, muy bien, ya esta otra vez retomando la programación. Muchas gracias por preguntar.
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1669
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: ComboBox en xBrowse

Postby Armando » Sat Jun 05, 2021 4:33 am

Leandro:

Excelente noticia

saludos de mi parte
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
Armando
 
Posts: 3201
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 43 guests