vickerps Posted July 15, 2010 Posted July 15, 2010 Hi Does anyone have the problem when using _GUICtrlIpAddress_Create and the user is an idiot and enters a value greater than 255. The Function correct the user error by reverting it to 255 but then stop movement to next octet. eg. if I enter 150.7.500. the function automatically changes it to 150.7.|255. but the cursor go behind the 255 which stops you entering anything.
Moderators Melba23 Posted July 15, 2010 Moderators Posted July 15, 2010 vickerps,I do not see it as a problem, more a welcome feature! If an "idiot" enters an invalid octet, the control prevents this, or any subsequent, value being taken into account and forces the user to correct it before continuing. The cursor is well positioned for the delete key and there is no doubt about which value needs to be corrected.M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
vickerps Posted July 15, 2010 Author Posted July 15, 2010 Thanks for the reply Melba23 I see your point but rather than replacing the value with 255 it would be better if it simply remove the entry all together and blank the incorrectly entered octet
PsaltyDS Posted July 15, 2010 Posted July 15, 2010 I see your point but rather than replacing the value with 255 it would be better if it simply remove the entry all together and blank the incorrectly entered octetThat control is a standard Windows API type (MSDN: IP Address Control), so if you don't like its behavior, talk to Microsoft: MSDN: IPM_SETRANGE Message RemarksIf the user enters a value in the field that is outside of this range, the control will send the IPN_FIELDCHANGED notification with the entered value. If the value is still outside of the range after sending the notification, the control will attempt to change the entered value to the closest range limit.Notice you can register the IPN_FIELDCHANGED message and deal with it yourself. The default behavior only happens if the parent app doesn't deal with it first. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now