if I remember correctly, some time ago a similar problem has been described somewhere. Maybe it was marked as Done, but one problem remains.
The following example code creates a simple window with MDI-window including one StringGadget with the parameter #pb_string_numeric. If you touch a wrong key ONE time, windows displays his "Oh my god - you touched a wrong key...". But the SECOND and even more times you touch wrong keys (like alphabetic keys...) the message remains intact but some parts of the MDI are becoming "destroyed" (not redrawn), like parts of the light red background color and parts of the TextGadget...
Try for yourself (I tried on Windows 7 x64 with PB 5.00 and PB 5.11b2):
Code: Select all
Define.i Wd, Sw, Md, Ev, Fi
Wd = OpenWindow(#PB_Any, 0, 0, 600, 400, "Test", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
If Not Wd = 0
SetWindowColor(Wd, RGB(255, 255, 255))
If CreateMenu(#PB_Any, WindowID(Wd))
OpenSubMenu("Window")
Md = MDIGadget(#PB_Any, 0, 0, 400, 300, 0, 0, #PB_MDI_AutoSize)
If Not Md = 0
Sw = AddGadgetItem(Md, #PB_Any, "MDI-Test")
If Not Sw = 0
ResizeWindow(Sw, #PB_Ignore, #PB_Ignore, 400, 300)
SetWindowColor(Sw, RGB(255, 100, 100))
StringGadget(#PB_Any, 20, 20, 100, 25, "", #PB_String_Numeric)
TextGadget(#PB_Any, 20, 45, 300, 25, "Please enter non-numeric values above!")
Repeat
Test = WaitWindowEvent(5000)
Select Test
Case #PB_Event_CloseWindow: Fi = 1
EndSelect
Until Fi = 1
EndIf
EndIf
EndIf
EndIf
End
Thanks for testing and responses, bamsagla.
Edit: Forgot to mention that everything works fine for me without MDI-Window (numeric StringGadget inside a simple window).
Edit2: Just for reviewing purposes - the Isxxx()-commands have been replaced by If-statements as Fred suggested.