Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #12313

Re: CellGroups - select

Newsgroups comp.lang.clipper.visual-objects
Date 2019-02-24 12:15 -0800
References <5ca924d0-559d-4ff1-8da2-d2681ad96a84@googlegroups.com> <e95d3b0c-d5b3-4ed5-8b78-c47439f4c588@googlegroups.com> <59619667-06d7-4197-813d-0656dd66357e@googlegroups.com>
Message-ID <ac2d16f7-e3aa-4d64-91a0-1c7ebd2da33c@googlegroups.com> (permalink)
Subject Re: CellGroups - select
From Sherlock <sherlock@sherlock.com.au>

Show all headers | View raw


Snip[  There is more data in a cell. ]

Then you need CellEdit()

Phil

METHOD CellEdit( oEvent ) CLASS ReceiptMultiple

	// Callback method for editing a cell in the bBrowser.
	// The method is automatically call by bBrowser
	// Argumete:
	// 		oEvent	: bCellEditEvent
	LOCAL nColNo    AS DWORD
	LOCAL nRowNo    AS DWORD
	
	//    IF oEvent:Window = SELF:oDCbCurrentValues
	IF SELF:symMode = #MODIFY

		// ----- NOTE from The Mighty Quinn:
		// ----- If you make changes here make sure you adjust the EventHandler() method as well

		nColNo  := oEvent:EditCell:Column
		nRowNo  := oEvent:EditCell:Row

		// evaluate event
		IF oEvent:EditMode = BEDIT_CREATE

			// ----- Row 1 - Rent
			// ----- Row 2 - Bonds
			// ----- Row 3 - Sundry
			// ----- Row 4 - 8 Extra 1-5

			// ----- Only test Extra 1-5 to see if we can edit it
			IF Between( nRowNo, 4, 8 )
				DO CASE
				CASE nRowNo = 4 .AND. SELF:oaServer:FIELDGET( #X_ALLOW1 )
				CASE nRowNo = 5 .AND. SELF:oaServer:FIELDGET( #X_ALLOW2 )
				CASE nRowNo = 6 .AND. SELF:oaServer:FIELDGET( #X_ALLOW3 )
				CASE nRowNo = 7 .AND. SELF:oaServer:FIELDGET( #X_ALLOW4 )
				CASE nRowNo = 8 .AND. SELF:oaServer:FIELDGET( #X_ALLOW5 )
				OTHERWISE
					// edit is not allowed
					ErrorBox{ SELF, "You cannot allocate money to this item."}:Show()
					RETURN FALSE
				ENDCASE
			ENDIF
			SELF:lInEdit := TRUE
		ELSE
			IF InList( oEvent:EditMode, BEDIT_END, BEDIT_CANCEL )
				SELF:lInEdit := FALSE
			ENDIF
		ENDIF
	ENDIF
	//
	RETURN TRUE

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

CellGroups - select szepligeti@gmail.com - 2019-02-22 08:22 -0800
  Re: CellGroups - select Sherlock <sherlock@sherlock.com.au> - 2019-02-22 08:31 -0800
    Re: CellGroups - select szepligeti@gmail.com - 2019-02-23 10:28 -0800
      Re: CellGroups - select Sherlock <sherlock@sherlock.com.au> - 2019-02-24 12:15 -0800
        Re: CellGroups - select szepligeti@gmail.com - 2019-02-26 03:52 -0800

csiph-web