Find Replace Dialog

Please share your functions/code-snips

Find Replace Dialog

Postby kenneth » Sun Jun 28, 2009 12:19 am

Hi All and Slowdown
This is my latest code with word Replace. Slowdown provided the Find code. We need to highlight the found line and move the curser to it(?????). This will be nice when it is done and a great help to others. Thank You Slowdown!!!...
Kenneth
Attachments
Find Replace Dialog.zip
Find Replace Dialog Test
(2.45 KiB) Downloaded 235 times
kenneth
 
Posts: 26
Joined: Thu May 21, 2009 12:05 am
Location: Eagle River, Wisconsin USA

Re: Find Replace Dialog

Postby Slowdown » Sun Jun 28, 2009 5:11 am

Hi Kenneth,
I have downloaded your find & replace and saw the the find code i have started with
contains not one bug but several bugs :(
I already asked Bernd in the code snippet topic if it's possible to move
the cursor by code.
If a have some time today i will dive into the code.
Regards
Slowdown for now i'm back
Slowdown
 
Posts: 347
Joined: Sat May 02, 2009 6:48 pm
Location: Netherlands

Re: Find Replace Dialog

Postby kenneth » Tue Jul 14, 2009 11:54 pm

Hi All,
This is the last version of the Find Replace Dialog. It is part of an Editor for Databases because there is not an available Database Grid. It will NOT search a Database, only the information within a RichTextBox field. That is the purpose. If you would need it for anything else you must modify the code. All thanks to Slowdown for all of the Functions.....enjoy!
Kenneth
Attachments
FindText.kbasic._project.zip
Last Version
(5 KiB) Downloaded 222 times
kenneth
 
Posts: 26
Joined: Thu May 21, 2009 12:05 am
Location: Eagle River, Wisconsin USA

Re: Find Replace Dialog

Postby Slowdown » Wed Jul 15, 2009 7:43 pm

Hi Kenneth,

Thanx Kenneth for the compliments.
Nice job and also nice to see that you left the dutch text in place ;)
I have run the program under Windows 7 and it worked as aspected but when using the same code
under OSX it wil crash but i recon that's a problem with KBasic (fill in a bug report for Bernd)
Also nice to tell that Bernd have fixed the problems with 'Remove', 'Insert' and replace so these functions now
works under Windows and Mac OS.
I'm not running Linux so i don't know if the bugs are fixed under Linux. (if these bugs are there under the Linux version)
At this point i'm writing my own simple editor but running into some troubles.
For example type a line longer that the richtextbox can hold so that the line wraps
to the next line.
Type a new line and than search a word in the last line.
The line will be found but not the column :oops:
Still trying to find the problem.
If someone is interested in the source i will upload it when i'm little bit futher.

Forgotten,
The layout under Windows and OSX is different.
Regards
Slowdown for now i'm back
Slowdown
 
Posts: 347
Joined: Sat May 02, 2009 6:48 pm
Location: Netherlands

Re: Find Replace Dialog

Postby kenneth » Wed Jul 15, 2009 11:13 pm

Hi All,
I have made a simple example of Search/Replace as a pop-up Dialog box. Developed on IMac OS x Leapard.
Should work on all with slight changes. This uses the Clipboard so it will work with any program that will Copy/Paste
to and from the clipboard. You may wish to handle the clipboard better, but will work as is.

Have fun......Kenneth
Attachments
Find Replace Dialog.zip
Sample of Dialog Box
(5.16 KiB) Downloaded 226 times
kenneth
 
Posts: 26
Joined: Thu May 21, 2009 12:05 am
Location: Eagle River, Wisconsin USA

Re: Find Replace Dialog

Postby kenneth » Thu Jul 16, 2009 2:53 am

Hi All and Slowdown,
I forgot to include the two Button Icons. One for small Open Button and one for the small Close Button.
Please ensure that the Path (Icon Path of Button) is correct to where-ever you put these Icons. If not the FindText.kbasic_Project(Zip) might not work on the IMac. If this is the case just change the path or use any Icon of your choice for these two Buttons.

The program will work on the IMac......No major bugs that I know of.

The IMac version of KBasic is buggy and there are memory leeks and redraw problems and the debugger is not all that good. I am sure that these minor problems will be corrected in later versions. For now we will just have to work around the problems the best we can.....I Love KBasic!!!

P.S. Please check that Word Wrap is set to True in the RichTextBox.

Kind Regards,
Kenneth
Attachments
Button Icons.zip
Button Icons for Open and Close small Buttons
(2.91 KiB) Downloaded 211 times
kenneth
 
Posts: 26
Joined: Thu May 21, 2009 12:05 am
Location: Eagle River, Wisconsin USA

Re: Find Replace Dialog

Postby Slowdown » Thu Jul 16, 2009 7:27 pm

Hi Kenneth,

Tested you're find and replace and you're richt no error's but a programmers error :roll:

findReplace.tiff
findReplace.tiff (97.74 KiB) Viewed 2175 times


The IMac version of KBasic is buggy and there are memory leeks and redraw problems and the debugger is not all that good.


Kenneth i can't agree completely with you on this one.
Yes there are some small problems but memory leeks are no problem here.

I am sure that these minor problems will be corrected in later versions.


Have you downloaded the latest version (release date 10 juli).
Bernd didn't anounce it but it is there :D
Love KBasic!!!

me to
Regards
Slowdown for now i'm back
Slowdown
 
Posts: 347
Joined: Sat May 02, 2009 6:48 pm
Location: Netherlands


Return to User-Functions

cron