logic value in txbrowse cell

Post Reply
User avatar
Detlef
Posts: 209
Joined: Mon Feb 07, 2022 9:54 pm

logic value in txbrowse cell

Post by Detlef »

Hi all,

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

Code: Select all | Expand

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?
User avatar
Marc Venken
Posts: 1485
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: logic value in txbrowse cell

Post by Marc Venken »

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
User avatar
Detlef
Posts: 209
Joined: Mon Feb 07, 2022 9:54 pm

Re: logic value in txbrowse cell

Post by Detlef »

Thanks, Marc.
Your idea works for me.
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: logic value in txbrowse cell

Post by nageswaragunupudi »

Code: Select all | Expand

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
User avatar
Detlef
Posts: 209
Joined: Mon Feb 07, 2022 9:54 pm

Re: logic value in txbrowse cell

Post by Detlef »

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