Top.Mail.Ru
Мастера DELPHI, Delphi programming community Титульная страница Поиск, карта сайта Написать письмо 
| Новости | Поиск | FAQ | Статьи | Книги | Новости VCL |
| Форумы ЧАТ | Орешник | KOL и MCK |
Форумы -» Основная («Начинающим»)/ Базы / WinAPI / Компоненты / Сети / Media / Игры / Corba и COM / KOL / FreePascal / .Net / Прочее / RSDN.ORG

« предыдущая ветвь | форум | следующая ветвь »

Label, Editbox and Mnemonic


Jon ©   (2009-07-23 20:02:00) 

There is a label and an editbox.

How do I add a mnemonic to the label?
Label.Caption := '&Test';
This does not produce an underlined T.

How do I link the label mnemonic to activate the exitbox?


Демьян   (2009-08-02 11:50:00) [1]

Wow! as it turned out, it's quite simply! :) We can hardly wait for new component!


Jon   (2009-08-02 03:17:00) [2]

I found that I can create underlined letters by changing the label style:

Label := NewLabel(Applet,'&Test');
Label.Style := Label.Style and not SS_NOPREFIX;

Now I just need it to accept the mnemonic ie ALT+Letter...


Jon   (2009-07-31 23:30:00) [3]

OK - I shall continue testing to try to create a component.
But why using Label.Caption := '&Test' does not produce an underlined T - is it possible?


Демьян   (2009-07-27 19:42:00) [4]

Sorry, I dont have enought experience/time for it, but I would happy if someone write something like this ))


Jon   (2009-07-27 14:25:00) [5]

Thanks. I do use SupportMnemonics but I cannot get it to work as needed with the label/editbox. What would be good is a component like the VCL's TLabeledEdit. Has anyone been able to create such a component?


Демьян   (2009-07-26 13:55:00) [6]

I can see, this work in design time but doesn't work in runtime. I already ran into it, seems it work really for menus, buttons, checkboxes:

function SupportMnemonics: PControl;
   {* This method provides supporting mnemonic keys in menus, buttons, checkboxes, toolbar buttons. }


Наверх

Титульная страница Поиск, карта сайта Написать письмо