Modify

Opened 14 years ago

Closed 13 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 Changed 14 years ago by Matt Diesel <Mat@…>

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 Changed 13 years ago by trancexx

  • Resolution set to Rejected
  • Status changed from new to closed

Previous comment explains why this is rejected.

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain Gary.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.