Chadak
asked on
tstringgrid with selected text
heya delphi 6 and win2k
i have a tstringgrid, is there a way to know the selected cell and the selected text inside a cell, i mean if inside the cell there is "hello wolrd" and the "llo wor" is blue and selected is there a way to know that selection. taking another component might not be an issue here.
thx
chad
i have a tstringgrid, is there a way to know the selected cell and the selected text inside a cell, i mean if inside the cell there is "hello wolrd" and the "llo wor" is blue and selected is there a way to know that selection. taking another component might not be an issue here.
thx
chad
ASKER
sorry maybe i didnt ask my question well, i knew how to get this, but how can i know what part of the text was selected with the mouse and is hightlited blue.
because i have a grid with a popupmenu, and at some moment i rightclick, pop my menu, and i need to so something with the selected value inside the cell. the cell might have 10 words in it and only 2 words might be selected and i want to get those 2 words.
because i have a grid with a popupmenu, and at some moment i rightclick, pop my menu, and i need to so something with the selected value inside the cell. the cell might have 10 words in it and only 2 words might be selected and i want to get those 2 words.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
this code can be executed from TMenuItem.OnClick as well.
mo.
mo.
ASKER
Im at home this weekend will try this monday morning
ASKER
thx works well
should have think of it
should have think of it
Use the Cells proeprty to return the text in specific cell, here's an example will Show you the content of selected cell, using the OnSelectCell even
procedure TForm1.StringGrid1SelectCe
ARow: Integer; var CanSelect: Boolean);
begin
ShowMessage(StringGrid1.Ce
end;