Board index » delphi » Underscores gone from sub-menu items

Underscores gone from sub-menu items

Hello

I am upgrading a D5 application that has been around for several years. For
some reason the hot key underscores no longer appear in the sub-menu items
(they do appear in the main menu items). If I hit the ALT key, then access a
sub-menu, the hot key underscores are displayed. A simple test app created
from scratch works fine. Any ideas?

Regards, Frederick C. Wilt

 

Re:Underscores gone from sub-menu items


On Fri, 28 Feb 2003 17:06:00 -0500, "Frederick C. Wilt"

Quote
<fcw...@mindspring.com> wrote:
>Any ideas?

This is a "feature" of XP, and there is a place you can turn it off,
as I understand it, so that the underscores show.

In the mean time, pressing the Alt key should make them appear.

Nick Hodges - TeamB
Lemanix Corporation
Please always follow the newsgroup guidelines --
http://www.borland.com/newsgroups

Re:Underscores gone from sub-menu items


Thanks for the feedback.

However I failed to provide enough info. The problem is appearing under
Windows 2000. In the display control panel there is a option to turn this on
and off but even when option is set such that the underscores should display
all of the time they don't in this application. In the test application they
do display. So something I have done to this application (or perhaps the
installation of a new or updated 3rd party product?) as changed the behavior
of this application. Sadly I have know idea when the behavior changed, I
only just noticed it but perhaps it has been that way for a while.

Very frustrating. Haven't a clue as to what to try to determine the cause of
the problem. I was hoping that this was a common problem that everyone knew
about but me.

I should mention that I put in some debug code to display to CodeSite the
Caption property of the various menu items and they are correct, the & is
present where expected.

Thanks, Frederick C. Wilt

Re:Underscores gone from sub-menu items


"Frederick C. Wilt" <fcw...@mindspring.com> wrote:

Quote
> [...] Haven't a clue as to what to try to determine the cause
> of the problem. [...] I should mention that I put in some
> debug code to display to CodeSite the Caption property of the
> various menu items and they are correct, the & is present
> where expected.

In my experiance, nearly every time I have encountered this
type of strange behavior, it has lead back to an invalid use of
memory.

Perhaps you're writing past the end of an allocated block or
you're using an object before it's been allocated or after it's
been deallocated. You also might be deallocating something
twice.

Writing past the end of an allocated block is most commonly
caused by defining a second pointer to a block of memory and
some sort of a logic error with manipulating the pointer.

It's easy to eliminate the possibility that you're deallocating
something twice. Since it's valid to free a NULL pointer, every
where you free memory, set the pointer to nil. It also might
help if you set your pointers to nil prior to allocating them. However, you should be checking to be sure that all allocations
are successful.

As for using memory before it's been allocated, I try to make
it a rule to allocate memory needed for the life of the form in
the OnCreate event and deallocate that memory in the OnDestroy
event. For other memory allocations, I try to keep the
deallocation in the same procedure.

HTH

~ JD

Re:Underscores gone from sub-menu items


Frederick,
There were several threads about this issue, during the last year,
and IIRC it was considered to be a bug. i myself "suffered" from
the same, in shifting from Win98 to W2k.
in all cases, the "accused" one was an "ImageList" which was
assigned to the Menu items. is this your case?
if so, try to experiment with it, even rebuilding it, and see the
results. other apps, surprisingly, with the same conditions, don't
necessarily experience the same results.
------
jacob

"Frederick C. Wilt" <fcw...@mindspring.com> wrote in message
news:3e5fef4b$1@newsgroups.borland.com...

Quote
> Thanks for the feedback.

> However I failed to provide enough info. The problem is appearing under
> Windows 2000. In the display control panel there is a option to turn this
on
> and off but even when option is set such that the underscores should
display
> all of the time they don't in this application. In the test application
they
> do display. So something I have done to this application (or perhaps the
> installation of a new or updated 3rd party product?) as changed the
behavior
> of this application. Sadly I have know idea when the behavior changed, I
> only just noticed it but perhaps it has been that way for a while.

> Very frustrating. Haven't a clue as to what to try to determine the cause
of
> the problem. I was hoping that this was a common problem that everyone
knew
> about but me.

> I should mention that I put in some debug code to display to CodeSite the
> Caption property of the various menu items and they are correct, the & is
> present where expected.

> Thanks, Frederick C. Wilt

Other Threads