logic value in txbrowse cell

logic value in txbrowse cell

Postby Detlef » Tue Feb 22, 2022 9:34 pm

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

Re: logic value in txbrowse cell

Postby Marc Venken » Tue Feb 22, 2022 9: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.04 with Harbour
User avatar
Marc Venken
 
Posts: 1442
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: logic value in txbrowse cell

Postby Detlef » Tue Feb 22, 2022 11:22 pm

Thanks, Marc.
Your idea works for me.
User avatar
Detlef
 
Posts: 209
Joined: Mon Feb 07, 2022 9:54 pm

Re: logic value in txbrowse cell

Postby nageswaragunupudi » Wed Feb 23, 2022 12:34 am

Code: Select all  Expand view  RUN
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
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: logic value in txbrowse cell

Postby Detlef » Wed Feb 23, 2022 10:10 am

Thanks for your suggests, Mr. Rao.
It works fine now.
User avatar
Detlef
 
Posts: 209
Joined: Mon Feb 07, 2022 9:54 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 27 guests