Solved

Value List Editor and SetEditorText

Posted on 2004-08-10
7
241 Views
Last Modified: 2010-04-05
hello,

i have a problem using the value list editor as usual , i  need to make some changes
in my memo1 when the user edit the cell text but this resulted an infinite
loop causing EStackOverFlaw,
cause each time memo1.setfocus is executed in the value editor setedittext
event , the setedittext is fired again and again and again (probably
because the valuelisteditor loses focus or something),

procedure TFrmMain.vleSetEditText(Sender: TObject; ACol, ARow: Integer; const Value: String);
begin
memo1.SelText := 'blabla';
--stuff---
memo11.SetFocus;
end;

how to solve this?, i read about using OnExit event but i need the SetEditText event to
access the old and new "value" variable,
any ideas?

Thanks In A
Yehia
0
Comment
Question by:yehiaeg
  • 4
  • 3
7 Comments
 
LVL 12

Expert Comment

by:esoftbg
ID: 11764599
I tested, but have not EStackOverFlow ????
0
 
LVL 12

Expert Comment

by:esoftbg
ID: 11764667
I have not Exception at all. Just Memo11 is Focused....
0
 
LVL 12

Expert Comment

by:esoftbg
ID: 11764737
I'll be back after 12 - 16 hours ....
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:yehiaeg
ID: 11764808
i ensure it does, i debug it line by line and when i reach memo1.SetFocus the debugger move to the top of of SetEditText event
0
 
LVL 12

Accepted Solution

by:
esoftbg earned 125 total points
ID: 11769557
Okay, you are right, when I Click on a ValueListEditor's Cell it raises an Event :
SetEditText(....);
Because inside this event performs:
  memo1.SetFocus;
it rises 4 times:
SetEditText(....);
but I have not exception ....

emil
0
 

Author Comment

by:yehiaeg
ID: 11772227
maybe because there is a few lines written in your SetEditText, i have about 30 lines of code and it does repeat itself continuously (not 4 times), any ideas?
0
 

Author Comment

by:yehiaeg
ID: 11772543
oops, i discovered that changing maintext.selstart causes the loop because when changing it the maintext SelChanged is fired wich also fires SetEdittext again...

Sorry for wasting your time.
Thanks
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
select query - oracle 16 101
Error E2158 compiling with Delphi XE10 Seattle 2 127
Create a path if not exists 7 108
Twebbrowser add css to the header 3 39
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question