Lena Posted May 7, 2015 Posted May 7, 2015 Hi. Please explain why not work in this code Key = 0? In VCL project not problem. void __fastcall TUniFormAddDat::UniEdit1KeyPress(TObject *Sender, System::WideChar &Key) { //Can only type numbers Set<char, '0', '9'>Dig; Dig << '0' << '1' << '2' << '3' << '4' << '5' << '0' << '6' << '7' << '8' << '9'; if(!Dig.Contains(Key) && Key != VK_BACK) { Beep(); //I hear the sound! Key = 0;//<- But this does not work. UniEdit1 displays all, and numbers and letters //try test delete does not work //UniEdit1->Text.Delete(UniEdit1->Text.Length()-1, 1); } } Quote
Abaksoft Posted January 10, 2016 Posted January 10, 2016 http://forums.unigui.com/index.php?/topic/3495-how-only-number-in-tunidbnumberedit-not-double-is-it-possible/&do=findComment&comment=16284 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.