Board index » delphi » Questions, questions, and more questions...

Questions, questions, and more questions...

I'm currently writing a small Windows 95 application using Delphi 2 that's
going to be used to demonstrate some basic communication methods as part of
my 4th year project at Massey University, New Zealand. The application
works, but now I need to tie up some loose ends.

As part of this application, the user should be able to highlight text in a
text box (I'm currently using a RichEdit box) and, WHILE this is happening,
have a magical number being updated AS the user highlights text. The way I
have described this to simplify the problem for other people before, is
that they could look at this "magical" number as simply being the number of
characters BEING highlighted, i.e., the number is being updated while the
user highlights more and more (or less) text. Has anyone got any
suggestions to how I should go about doing this?

Next problem I have encountered regards a CheckBox that simply is supposed
to toggle the Word Wrap in the RichEdit box. However, I want a message pop
up if and only if there is something highlighted in the text box warning
the user that their selection will be lost if they proceed -- they are
given an option to cancel or to continue. The way I have done this so far
is to write code in the OnEnter event of the CheckBox but this gets
executed even when you tab to it (and it does some other weird stuff too
like blinking). Has anyone got any ideas? I've also wanted to do something
else partially relating to this. You see, the user has a few options and
what have we that they can tab to and change using the keyboard or simply
by using their mouse to change these by a click. I wondered if there's a
way of only getting the focus to change to the RichEdit box if and only if
you click any of these using the mouse (but not if the tab key or any other
key is used to move around or to toggle these values). I used to always
shift the focus using the SetFocus method but this is a real pain if you
are using the keyboard to change more than one setting (as you have to tab
back to the last position you were up to). Has anyone got any ideas
relating to these problems?

Next problem (phew) is related to the Clipboard. How can I check if there
is something on the Clipboard? I want to know this so that I can change the
"Paste" menu (I'm using a PopupMenu) item dynamically to being enabled or
disabled depending on if there's anything on the Cliboard or not. I thought
that (once I knew how to check the Clipboard) I would check the state of
the Clipboard on the OnPopup event and set the Enable accordingly. But
would any changes to the state of the menu items be modified if I changed
them at this stage? Or do I have to call the PopupMenu's Refresh method?
Any tips, anyone?

When I create a dialog box (using MessageDlg()), the systems sound event
that's assigned with the action (warning [exclamation], etc.) does not
appear. Is there another system dialog or other function that I should be
using?

A short question: What sort of event should I capture when the RichEdit's
input exceeds its limit? I want to do this so I can bring up a dialog when
this occurs.

Has ANYONE got ANY suggestions to ANY of these little problems?

-Andreas (Andreas.T...@xtra.co.nz)

P.S. I would prefer e-mail replies as I'm not a regular reader of the
newsgroups...

 

Re:Questions, questions, and more questions...


i need some info about firewalls.  If you could share some it will be deeply ap
preciated.

Other Threads