FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour To nages : modify of a xbrowse
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
To nages : modify of a xbrowse
Posted: Wed May 08, 2024 10:41 AM
Nages,
I have this xbrowse with an array




when I modify 4th column and the string is "45" i can insert only 2 space

how I can resolve ?

I made
Code (fw): Select all Collapse
WITH OBJECT oBrwFilter

      :bPastEof     := { ||  AddRow( oBrwFilter ) }
      :bKeyDown  := { |nKey| If( nKey == VK_DELETE, DeleteRow( oBrwFilter ), ;
                             If( nKey == VK_INSERT, InsertRow( oBrwFilter ), ;
                              nil ) ) }

               :aCols[1]:nEditType :=  EDIT_LISTBOX
               :aCols[1]:aEditListTxt := acOperators

               :aCols[2]:nEditType :=  EDIT_LISTBOX
               :aCols[2]:aEditListTxt := aTitulos

               :aCols[3]:nEditType :=  EDIT_LISTBOX
               :aCols[3]:aEditListTxt := acOpRelacion

               :aCols[4]:nEditType :=  EDIT_GET


      :lRecordSelector     := .f.
      :lHScroll             := .f.
      :lVScroll             := .f.
      :CreateFromCode()
   END
for the first column I wish it not show the listbox when is the first line of array

this not run

:aCols[1]:bEditBlock := { |r,c,oCol|IIF(!oBrwFilter:nArrayAt = 1, MsgInfo("Non puoi")) }


for the 4th column I have problem because I cannot insert more characters
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: To nages : modify of a xbrowse
Posted: Wed May 08, 2024 02:22 PM
for the 4th column I have problem because I cannot insert more characters
Add this code:
Code (fw): Select all Collapse
oBrw:aCols[ 4 ]:nDataLen := n  // where n is the number of chars you want to enter
OR
Code (fw): Select all Collapse
oBrw:aCols[ 4 ]:lVarChar := .T.
// AND/OR
aCols[ 4 ]:nMaxLen := n
Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: To nages : modify of a xbrowse
Posted: Wed May 08, 2024 07:49 PM
nageswaragunupudi wrote:
for the 4th column I have problem because I cannot insert more characters
Add this code:
Code (fw): Select all Collapse
oBrw:aCols[ 4 ]:nDataLen := n  // where n is the number of chars you want to enter
OR
Code (fw): Select all Collapse
oBrw:aCols[ 4 ]:lVarChar := .T.
// AND/OR
aCols[ 4 ]:nMaxLen := n

Nages,
on first column I made

:aCols[1]:nEditType := EDIT_LISTBOX
:aCols[1]:aEditListTxt := acOperators
:aCols[1]:bEditBlock := { |r,c|IIF(oBrwFilter:nArrayAt = 1,MsgInfo("not"),) }


I not want the end use can select the combobox if is on first line ( SEE THE PICTURE)


Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: To nages : modify of a xbrowse
Posted: Thu May 09, 2024 03:41 PM
What is this?
Code (fw): Select all Collapse
:aCols[1]:bEditBlock := { |r,c|IIF(oBrwFilter:nArrayAt = 1,MsgInfo("not"),) }
What is the purpose of bEditBlock?
Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: To nages : modify of a xbrowse
Posted: Thu May 09, 2024 08:20 PM
nageswaragunupudi wrote:What is this?
Code (fw): Select all Collapse
:aCols[1]:bEditBlock := { |r,c|IIF(oBrwFilter:nArrayAt = 1,MsgInfo("not"),) }
What is the purpose of bEditBlock?
I not Know I found this line on this forum

on first colum I use

:aCols[1]:nEditType := EDIT_LISTBOX
:aCols[1]:aEditListTxt := acOperators

I wish only it can run only when the oBrwFilter:nArrayAt not is 1 ( first row)
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: To nages : modify of a xbrowse
Posted: Mon May 13, 2024 05:03 AM
Code (fw): Select all Collapse
oBrw:bEditWhen := { || oBrw:nArrayAt > 1 }
When the user is on line 1, he can open and see the list but can not change the value
Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: To nages : modify of a xbrowse
Posted: Mon May 13, 2024 06:28 AM
Another way
Code (fw): Select all Collapse
oBrw:bChange := { |oBrw| XbrChange( oBrw ) }

//
//
//
function XbrChange( oBrw )

   if oBrw:nArrayAt == 1
      oBrw:aCols[ 1 ]:nEditType := 0
   else
      WITH OBJECT oBrw:aCols[ 1 ]
         :nEditType := EDIT_LISTBOX
         :aEditListTxt := acOperators
      END
   endif
Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: To nages : modify of a xbrowse
Posted: Mon May 13, 2024 07:05 AM
nageswaragunupudi wrote:Another way
Code (fw): Select all Collapse
oBrw:bChange := { |oBrw| XbrChange( oBrw ) }

//
//
//
function XbrChange( oBrw )

   if oBrw:nArrayAt == 1
      oBrw:aCols[ 1 ]:nEditType := 0
   else
      WITH OBJECT oBrw:aCols[ 1 ]
         :nEditType := EDIT_LISTBOX
         :aEditListTxt := acOperators
      END
   endif

Nages,
Not run ok



I can modify the first line and the first column
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: To nages : modify of a xbrowse
Posted: Mon May 13, 2024 08:09 PM
Not run ok
Recheck your implementation.
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion