Jump to content

GUICtrlIpAddress_Create


Recommended Posts

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.

Link to comment
Share on other sites

  • Moderators

vickerps,

I do not see it as a problem, more a welcome feature! :blink:

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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

That 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

Remarks

If 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.

:blink:

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
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...