Конференция "KOL" » Label, Editbox and Mnemonic
 
  • Jon © (23.07.09 20:02) [0]
    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?
  • Демьян (26.07.09 13:55) [1]
    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. }
  • Jon © (27.07.09 14:25) [2]
    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?
  • Демьян (27.07.09 19:42) [3]
    Sorry, I dont have enought experience/time for it, but I would happy if someone write something like this ))
  • Jon © (31.07.09 23:30) [4]
    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?
  • Jon © (02.08.09 03:17) [5]
    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...
  • Демьян (02.08.09 11:50) [6]
    Wow! as it turned out, it's quite simply! :) We can hardly wait for new component!
 
Конференция "KOL" » Label, Editbox and Mnemonic
Есть новые Нет новых   [134465   +2][b:0][p:0.001]