Modify

Opened 15 years ago

Closed 14 years ago

#1837 closed Feature Request (Rejected)

_GUICtrlIpAddress_EnableDisable

Reported by: cyrusbuilt@… Owned by: Gary
Milestone: Component: Standard UDFs
Version: Severity: None
Keywords: Cc:

Description

There is currently a UDF to show/hide a IPAddress control, but not one to enable/disable it. The built-in function GUICtrlSetState() does not seem to have any affect on the IPAddress control either. As such, I propose the addition of a UDF to enable/disable the IPAddress control in the GuiIPAddress.au3 library. The implementation would wrap _WinAPI_EnableWindow() from WinAPI.au3 much like _GUICtrlIpAddress_ShowHide() wraps _WinAPI_ShowWindow().

The following is the proposed implementation:

#include <WinAPI.au3>
Func _GUICtrlIpAddress_EnableDisable($hWnd, $iState = @SW_ENABLE)
	If (Not IsHWnd($hWnd)) Then Return SetError(1, 1, 0)
	If (($iState <> @SW_ENABLE) And ($iState <> @SW_DISABLE)) Then Return SetError(2, 1, 0)
	Local $enabled = True
	If ($iState == @SW_DISABLE) Then $enabled = False
	Return (_WinAPI_EnableWindow($hWnd, $enabled) <> 0)
EndFunc

Attachments (0)

Change History (2)

comment:1 by Matt Diesel <Mat@…>, 15 years ago

If we had to add functions like this for every control UDF then we'd be here a long time. That's why there is a generic function (_WinAPI_EnableWindow) and even a native solution in the form of ControlDisable.

comment:2 by trancexx, 14 years ago

Resolution: Rejected
Status: newclosed

Previous comment explains why this is rejected.

Modify Ticket

Action
as closed The owner will remain Gary.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.