Hi
I do not to get to format my maskedit, I want show a 0.993 when the control lost focus, but It show me 993, I want show zero left (0.885 or 0.889 no 885 or 889)
tia
Printable View
Hi
I do not to get to format my maskedit, I want show a 0.993 when the control lost focus, but It show me 993, I want show zero left (0.885 or 0.889 no 885 or 889)
tia
i don't really understand your question.
your MaskEdBox1 does what you want...
hI
When MaskEdBox1 lost Focus It show 993 , and I want 0.993 com zeros in left
i'm not getting that behaviour - when you click Command1 0.993 is displayed, followed by 993 - but that's what you've asked it to do...
MaskEdBox1 remains as 0.993
I want , when MaskEdBox1 lost Focus It show me 0.993 not 993
it's nothing to do with LostFocus.
you mean when you click Command1 you want it to MsgBox the correct value.
use MaskEdBox1.FormattedText
VB Code:
Private Sub MaskEdBox1_LostFocus() MsgBox Format(MaskEdBox1, "0,###") End Sub
Refer the sample attached. And use the button2.
Propertiesx to look at ClipMode = IncludeLiterals
MsgBox Me.MaskEdBox2.Text
Hope this helps!!
Sorry, My english is terrible
My question is not about buttons , but about when the controls lost focus , I want let it as 0.993 and not 993
tks :( :(
As i said in post #6, use MaskEdBox1.FormattedText instead of MaskEdBox1.Text
for me , show only read only :(
eh?VB Code:
Private Sub MaskEdBox1_LostFocus() MsgBox MaskEdBox1.FormattedText End Sub
tks, but I do not want show in Msgbox, but when the maskedit lost focus (go a other control) , It show 1 integer and 3 decimals
If I typed 1.933 It work fine , because show me 1.933
But
If I typed 0.933 It do not work fine , show me 933
when It Lost focus
where do you want to show it? Coz when you leave the MaskedEdit1 control, the data entered is formatted as is.....