Delphi Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreDelphi Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 19th, 2012, 06:49 AM
dve83 dve83 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: South Africa
Posts: 29 dve83 User rank is Private First Class (20 - 50 Reputation Level)dve83 User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 6 h 20 m 44 sec
Reputation Power: 0
Send a message via MSN to dve83 Send a message via Yahoo to dve83 Send a message via Skype to dve83
Alt Keys / Hotkeys

Hi,

normal buttons don't seem to have an AutoHotKey option in Delphi 7. So I have a custom form class which would be able to adjust the captions of the buttons by inserting the & at the appropriate place (hence auto generating my own hotkeys based on available letters on the form).


My Question: Any suggestions for a efficient algorithm?

My initials thoughts:
1. Start with shortest captions and insert & starting with first available letters. (ie. Button1 and Button2 becomes &Button1 and B&utton2

2. Then, after running through all buttons, we will possibly have some that havent been assigned any & due to none-available letters. Suggest I then run through already assigned captions (starting with longest words) and see if I can find appropriate letter for usage within these already assigned words and (as a result) amend both to find a letter for my current button.

Perhaps this is a subclass of a familiar problem that I dont seem to figure :-)

Reply With Quote
  #2  
Old September 25th, 2012, 12:34 AM
Luthfi Luthfi is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2012
Posts: 140 Luthfi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 4 h 58 m 17 sec
Reputation Power: 2
Very interesting. IMHO I don't think automatic hotkey generation is good for user interface consistency. Because there is a chance hotkey difference between builds (of the same major/minor version). But I can see that this a time saving.

In order to minimize the possibility of unnecessary hotkey generation and assignment, we have add step 0. In step 0 we list all the buttons, and using this list we should not change buttons that already have hotkeys.

What do you think?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreDelphi Programming > Alt Keys / Hotkeys

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap