Backwards search / Rückwärtssuche

P

Peter Merz

Englisch:
Rear one, I have the following problem, I a program wrote, in which
one cannot look for it from above downward clicks one in the field
however from down upward, goes.

I must sketch now an algorithm, which scans a text upward, there my
program (power ++ of Sybase) such a function as standard equipment do
not provide.

The code for forward-searches:



German:

Hi,
Ich habe folgendes Problem, ich habe ein Programm geschrieben, in dem man
von oben nach unten suchen kann. klickt man im Feld jedoch von unten nach
oben, geht es nicht.

Ich muss nun einen Algorithmus entwerfen, der nach oben einen Text
durchsucht, da mein Programm (Power ++ von Sybase) eine solche Funktion von
Haus aus nicht mitliefert.

Der Code für die vorwärtssuche:

if (event->findNext)
{
suchtext = Suchen_Ersetzen_Dialog_1->GetFindText();
if (event->searchDown)
{
position = Richtextfeld_1->FindText( suchtext, FALSE, ganzwort,
beginAt );
if (position < 0)
{
position = Richtextfeld_1->FindText(suchtext);
}
text_laenge = suchtext.GetLength();
zeichen_index.start = position;
zeichen_index.end = position + text_laenge;
beginAt = zeichen_index.end;

Richtextfeld_1->SetFocus( );
Richtextfeld_1->SetEditSelection( zeichen_index );
}
else
{

//hier muss die Rückwartssuche rein!!!


}


}




return FALSE;
}



Englisch:

Into the elsespalte now the Rueckwaertssuche should purely. A
Richtextfeld is scanned. The program which I use is Power++ of Sybase.
The variable beginAt indicates the current cursor position in the
text.

Over each assistance I am grateful!



German:
In die elsespalte sollte nun die Rückwärtssuche rein. Es wird ein
Richtextfeld durchsucht.
Das Programm das ich nutze ist Power++ von Sybase.
Die Variable beginAt gibt die aktuelle Cursorposition im Text an.

Über jede Hilfe bin ich dankbar!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top