FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour logic value in txbrowse cell
Posts: 218
Joined: Mon Feb 07, 2022 09:54 PM
logic value in txbrowse cell
Posted: Tue Feb 22, 2022 09:34 PM
Hi all,

I have an issue with a logic cell in my txBrowse.
Column 4 represents a field of type "L".

Code (fw): Select all Collapse
WITH OBJECT oBrw:aCols[ 4 ]
      :SetCheck()
      :bLDClickData := { || pos->okay := !pos->okay, oBrw:Refresh() }  
END


Now I can toggle the cell value by doubleclick.
But I can't toggle with no keypress at all.

What do I miss?
Posts: 1487
Joined: Tue Jun 14, 2016 07:51 AM
Re: logic value in txbrowse cell
Posted: Tue Feb 22, 2022 09:51 PM

I use this to toggle a Logic field with F2 Key

oBrw[1]:bKeyDown := {| k | IF ( K == VK_F2, if(oBrw[1]:uitass:value = .f., oBrw[1]:uitass:Varput( .t. ), oBrw[1]:uitass:Varput( .F. ) ) , NIL ) }

Marc Venken

Using: FWH 23.08 with Harbour
Posts: 218
Joined: Mon Feb 07, 2022 09:54 PM
Re: logic value in txbrowse cell
Posted: Tue Feb 22, 2022 11:22 PM

Thanks, Marc.
Your idea works for me.

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: logic value in txbrowse cell
Posted: Wed Feb 23, 2022 12:34 AM
Code (fw): Select all Collapse
WITH OBJECT oBrw:aCols[ 4 ]
      :SetCheck( nil, .t. )  // .t. means :nEditType := EDIT_GET
//      :bLDClickData := { || pos->okay := !pos->okay, oBrw:Refresh() }  // not required
END


Double click on cell automatically toggles the value.
If marqueestyle <= 4, <Space> key toggles the value.
Regards



G. N. Rao.

Hyderabad, India
Posts: 218
Joined: Mon Feb 07, 2022 09:54 PM
Re: logic value in txbrowse cell
Posted: Wed Feb 23, 2022 10:10 AM

Thanks for your suggests, Mr. Rao.
It works fine now.

Continue the discussion