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


Groups > comp.lang.clipper.visual-objects > #12307 > unrolled thread

CellGroups - select

Started byszepligeti@gmail.com
First post2019-02-22 08:22 -0800
Last post2019-02-26 03:52 -0800
Articles 5 — 2 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  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

#12307 — CellGroups - select

Fromszepligeti@gmail.com
Date2019-02-22 08:22 -0800
SubjectCellGroups - select
Message-ID<5ca924d0-559d-4ff1-8da2-d2681ad96a84@googlegroups.com>
Hi,

How do I select data in a cell, such as double-clicking?

http://szepligeti.hu/Download/CellGroups.png

Example?

Szepligeti

[toc] | [next] | [standalone]


#12308

FromSherlock <sherlock@sherlock.com.au>
Date2019-02-22 08:31 -0800
Message-ID<e95d3b0c-d5b3-4ed5-8b78-c47439f4c588@googlegroups.com>
In reply to#12307
snip[ How do I select data in a cell, such as double-clicking? ]

This might help you..

METHOD CellSelect( oControlEvent ) CLASS _dwSalesPhotos

 LOCAL nColumn	AS DWORD
 LOCAL nRow	AS DWORD
 LOCAL nRecNo	AS DWORD

 nColumn := oControlEvent:Control:CurrentColumn
 nRow	:= oControlEvent:Control:CurrentRow
 nRecNo	:= oControlEvent:Control:Server:RecNo
	
 DO CASE
   CASE oControlEvent:Control = SELF:oDCbAttributes
     DO CASE
	CASE InList( nColumn, 1, 2 )
	SELF:oDCbAttributes:SelectionSet( #SINGLE, 1, nRow, nRecNo  )
	SELF:oDCbAttributes:SelectionSet( #SINGLE, 2, nRow, nRecNo  )
    CASE InList( nColumn, 3, 4 )
 	SELF:oDCbAttributes:SelectionSet( #SINGLE, 3, nRow, nRecNo  )
	SELF:oDCbAttributes:SelectionSet( #SINGLE, 4, nRow, nRecNo  )
   ENDCASE
ENDCASE	
RETURN ISEXECUTED

[toc] | [prev] | [next] | [standalone]


#12311

Fromszepligeti@gmail.com
Date2019-02-23 10:28 -0800
Message-ID<59619667-06d7-4197-813d-0656dd66357e@googlegroups.com>
In reply to#12308
Hi Sherlock,

Unfortunately not.
There is more data in a cell.
Selecting the entire cell does not help, I cannot refer to the individual data.

Szepligeti

[toc] | [prev] | [next] | [standalone]


#12313

FromSherlock <sherlock@sherlock.com.au>
Date2019-02-24 12:15 -0800
Message-ID<ac2d16f7-e3aa-4d64-91a0-1c7ebd2da33c@googlegroups.com>
In reply to#12311
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

[toc] | [prev] | [next] | [standalone]


#12315

Fromszepligeti@gmail.com
Date2019-02-26 03:52 -0800
Message-ID<5a39343d-0afb-4c85-ad29-9e44726eb747@googlegroups.com>
In reply to#12313
Hi,

Unfortunately, I could not read the data of the child cell in the parent cell.
That's the CellToolTip method for me.
You also know where we click when the child cell goes beyond the parent cell.

sID:= String2Symbol("ID_"+NTrim(oStartCell:Column)+"_"+NTrim(oStartCell:RECNO)+"_"+NTrim(int(oStartCell:ColumnPercentage) )+"_"+NTrim(int(oEndCell:ColumnPercentage) ))


self:nRowID:= ocgiItem:PropertyGet(sID,0) //Unique identifier


Szepligeti

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web