Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

onCellChanging - howto declaration format (Borland C++B)

Status
Not open for further replies.

protechst

Technical User
Jan 22, 2003
3
0
0
NO
Howdy,
I am using the application environment Borland C++Builder Professional/EnterPrise edition version 6. And I would like to implement an ‘onCellChanging() event function in the SOfferlineGrid (table/grid displaying sales lines) that triggers when text length exceeds maximum allowed.

But this method does not appear in this list on the attempts I have made so far. However, I have already implemented the check as an onexit() event (onCellValidate I believe), but would like to declare it so that a warning is given prior to exit and at the time the length exceeds maximum. I have tried to find any on-line help to see the expected declaration, but no on-line help description for this available for this. I have not been able to find it described on the Internet, either. For example something like:

void __fastcall TfrmMain::grdOfferLinesChkLengthEvent(TObject *Sender, int ARow, int ACol, bool &CanEdit)

I am sure someone out there have implemented a similar event. I appreciate any help.

//Sverre (1)


I have also thought of using some sort of special (custom) editor type, but if I used that for the column, I was not a ble to edit anything in the cell. That was probably because I hadn’t set up the rules, but I also don’t know how to setup up ‘editor type ‘ rules (edfloat,ednormal), and also haven’t paid it much attention. However, that approach also seems less appropriate as I believe it deals more with defining legal input characters and not checking length and hence may be wasted here.

//Sverre (2)
 
You can implement your own event if you want. Look at
for more help.


James P. Cottingham
-----------------------------------------
[sup]To determine how long it will take to write and debug a program, take your best estimate, multiply that by two, add one, and convert to the next higher units.[/sup]
 
Hi James P. Cottingham (2ffat),

Many thanks for your links. However, I am not able to find any stuff about the things I am looking for, i.e. cell event handling. Mind you, I am not able to access the third link as it requires subscription.

So answers of the form try the following:
void __fastcall TfrmMain::grdOfferLinesChkLengthEvent(TObject *Sender, int ARow, int ACol, bool &CanEdit)

would save me time. Thanks anyway. //Sverre
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top