德尔福的总输入禁止标志

时间:2016-03-09 08:02:01

标签: delphi

我使用的是组合框,而且我没有像ReadOnly这样的价值。

如何阻止在此组件中输入任何标志的可能性。

我尝试了类似OnKeyPress

的内容
 if Key in ['a'..'z', 'A'..'Z'] then
    Key := #0

1 个答案:

答案 0 :(得分:6)

将组合框的<!DOCTYPE html> <html> <head> <link rel="stylesheet" href="style.css"> <script src="script.js"></script> <style> /* this will be applied to the images */ .smallicon { width: 16px; padding: 5px; } </style> </head> <body> <p> Problem exists in Internet Explorer only <br> This is fine: </p> <object class="smallicon icon-white" data="http://konradpapala.beep.pl/test/040__file_delete.svg" type="image/svg+xml"></object> <table> <thead> <tr> <th>This is not OK, unless we add style = 'width:20px;height:20px' to the td tag, BTW "normal" images, like .png work fine</th> <th>This doesn't work either:</th> </tr> </thead> <tbody> <tr> <td> <img class='smallicon' src='http://konradpapala.beep.pl/test/040__file_delete.svg'> </td> <td> <object class='smallicon' data = 'http://konradpapala.beep.pl/test/040__file_delete.svg' type="image/svg+xml"></object> </td> </tr> </tbody> </table> </body> </html> 属性更改为Style。然后用户无法在其中键入任何内容。