BBC BASIC for Windows
« Find/Replace »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 9:58pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Find/Replace  (Read 862 times)
Matt
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 210
xx Find/Replace
« Thread started on: May 2nd, 2013, 06:12am »

Hi Richard,

At the risk of starting a request slot, may I make two small requests if, and when, you decide to upgrade again.

The find/replace is a very useful tool, but it always appears in the same place each time it's opened - right over the text. I have to move it constantly to the right hand side of the screen to see more of what's happening. Is it possible to either have it placed there perminently or even at 'last position'?

Also, could it be possible to have it just scan a highlighted area. If I'm relacing a huge number of items, using the 'replace all' is ideal but will change all in the program rather than just those in, say, just a PROC? I know there are ways around this - copying the section to Notepad and use its find/replace, then copy back, but BB4W's is much easier.

I appreciate you have indicated before that you don't want to change anything unless it's neccessary, so please ignore this if you don't think it so. Thanks for your time and effort.

Matt
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Find/Replace
« Reply #1 on: May 2nd, 2013, 08:37am »

on May 2nd, 2013, 06:12am, Matt wrote:
Is it possible to either have it placed there perminently or even at 'last position'?

As you would expect, it uses the standard Windows FindText and ReplaceText API functions:

http://msdn.microsoft.com/en-gb/library/windows/desktop/ms646918.aspx
http://msdn.microsoft.com/en-gb/library/windows/desktop/ms646946.aspx

As far as I am aware there is no way to determine where these dialogue boxes are displayed; Windows decides that for itself. Since the functions return a window handle of the dialogue box it would be possible to move it after it is created, but you might well then see it momentarily appear in one location and then move to another, which I think could be disconcerting.

The functions do provide a 'hook' facility which allows you to intercept the initialisation of the dialogue box. It may be that this would enable changing its position without a visible glitch, but that would have to be investigated.

One might like to think that if opening a Find/Replace box at the 'last position' was a generally useful feature, Windows would do it automatically, or at least provide the option!

Quote:
Also, could it be possible to have it just scan a highlighted area.

I guess that would theoretically be possible, but how would one enable that mode of operation? Ideally it would need a checkbox to be added to the Find and Replace dialogue boxes, which again is quite a lot of work because it means providing a custom template rather than using the standard one.

In many years of extensive use of BB4W, including some very large applications, I can't say I've found either of those issues any more than a minor invonvenience. I'm not really motivated to put in the effort to address them, sorry. But I would be interested to know if others feel the same way as you.

Edit: I've just realised there's a major problem with searching only the selected region - Find/Replace uses the selection mechanism to highlight the found string! So as soon as the first occurrence has been found, there is no longer any record of where the selected region previously was! That rules it out, I'm afraid.

Richard.
« Last Edit: May 2nd, 2013, 08:45am by admin » User IP Logged

Matt
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 210
xx Re: Find/Replace
« Reply #2 on: May 2nd, 2013, 4:20pm »

Thanks for replying, Richard. Just thought I'd ask.

Matt.
User IP Logged

flamerz
New Member
Image


member is offline

Avatar




PM


Posts: 2
xx Re: Find/Replace
« Reply #3 on: May 2nd, 2013, 5:15pm »

if you want to keep the Find window in a specified place you can install some 3rd party tool to do that (like Actual Window Guard).

i dont use it, but i checked with the trial and works.

good luck.
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Find/Replace
« Reply #4 on: May 2nd, 2013, 9:44pm »

on May 2nd, 2013, 5:15pm, flamerz wrote:
if you want to keep the Find window in a specified place you can install some 3rd party tool to do that (like Actual Window Guard).

That's a good suggestion.

Another idea possibly worth considering is to leave the Replace dialogue open 'continuously' throughout a session. Then you can position it anywhere you want and it should stay there until moved or closed. There's no actual need to open a new Replace dialogue to start a new search.

Richard.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls