Solved

Value List Editor and SetEditorText

Posted on 2004-08-10
7
237 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
Comment Utility
I tested, but have not EStackOverFlow ????
0
 
LVL 12

Expert Comment

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

Expert Comment

by:esoftbg
Comment Utility
I'll be back after 12 - 16 hours ....
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

Author Comment

by:yehiaeg
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now