Recent

Author Topic: How to disable accelerator keys (&) in TreeView node text?  (Read 4022 times)

NelsonN

  • Jr. Member
  • **
  • Posts: 69
    • Beam Me Up!
How to disable accelerator keys (&) in TreeView node text?
« on: January 25, 2011, 12:38:37 am »
I am using a TreeView to navigate a category table from an SQL server. The accelerator keys are a pain when loading the categories if they include an ampersand in the name; such as "Trucks & Loaders", it shows up as "Trucks _Loaders".

I have searched and haven't found a way to cancel them. I am hoping someone around here can point me in the right direction.

In my search for an answer, I learned that for labels I can use:

Label1.ShowAccelChar := False;
Lazarus trunk / FPC 3.0.4 / 32-bit and 64-bit with Windows 10.

NelsonN

  • Jr. Member
  • **
  • Posts: 69
    • Beam Me Up!
Re: How to disable accelerator keys (&) in TreeView node text?
« Reply #1 on: January 25, 2011, 10:14:55 pm »
Anyone?

The issue here is that I can have it show the '&' with a double '&&' but when it comes time to rename the category the '&&' has to be dealt with again. I fear that coding around this is just a kludge and unnecessary.

There has to be a way to turn it off.
Lazarus trunk / FPC 3.0.4 / 32-bit and 64-bit with Windows 10.

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2583
Re: How to disable accelerator keys (&) in TreeView node text?
« Reply #2 on: January 26, 2011, 12:46:24 am »
Report a bug, IMO it shouldn't draw accelerators there
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

 

TinyPortal © 2005-2018