Editing individual lines

Editing individual lines

Postby Natter » Wed Mar 17, 2021 11:02 am

The xBrowse column is assigned the edit type EDIT_BUTTON. Accordingly, a button will appear in each row of the column. Is it possible for individual xBrowse rows not to show this button ?
Natter
 
Posts: 1203
Joined: Mon May 14, 2007 9:49 am

Re: Editing individual lines

Postby MGA » Wed Mar 17, 2021 11:40 am

trying to help

#include "FiveWin.ch"
#include "XBrowse.ch"

function Main()

local oDlg, oFld, oBrw1, oBrw2
local aDat1, aDat2

aDat1:={{"Row1-Col1","Row1-Col2","Row1-Col3"},;
{"Row2-Col1","Row2-Col2","Row2-Col3"},;
{"Row3-Col1","Row3-Col2","Row3-Col3"},;
{"Row4-Col1","Row4-Col2","Row4-Col3"}}

aDat2:={{"ROW1-COL1","ROW1-COL2","ROW1-COL3"},;
{"ROW2-COL1","ROW2-COL2","ROW2-COL3"},;
{"ROW3-COL1","ROW3-COL2","ROW3-COL3"},;
{"ROW4-COL1","ROW4-COL2","ROW4-COL3"}}

DEFINE DIALOG oDlg RESOURCE "Test"

REDEFINE FOLDER oFld ;
PROMPTS "One", "Two" ;
DIALOGS "One", "Two" ;
ID 100 OF oDlg

REDEFINE XBROWSE oBrw1 ID 10 OF oFld:aDialogs[ 1 ] ARRAY aDat1 AUTOCOLS

REDEFINE XBROWSE oBrw2 ID 10 OF oFld:aDialogs[ 2 ] ARRAY aDat2 AUTOCOLS

OBRW1:BCHANGE := {|| oBrw1:aCols[ 2 ]:nEdittype := IIf(obrw1:narrayat==1,EDIT_GET,EDIT_BUTTON), OBRW1:REFRESH() }
oBRW1:lColChangeNotify := .T.

oBrw1:aCols[ 2 ]:nEdittype := IIf(obrw1:narrayat==1,EDIT_GET,EDIT_BUTTON)
oBrw1:aCols[ 2 ]:bEditBlock := { || MsgYesNo( "Please select" ) }

oBrw2:aCols[ 2 ]:nEdittype := EDIT_GET

ACTIVATE DIALOG oDlg CENTERED

return nil
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1249
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

Re: Editing individual lines

Postby Natter » Wed Mar 17, 2021 11:59 am

Thank you, I'll try. But it seems to me to rewrite the PaintCell method for myself
Natter
 
Posts: 1203
Joined: Mon May 14, 2007 9:49 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 40 guests