Opened 16 years ago
Closed 13 years ago
#1709 closed Feature Request (Rejected)
GuiCtrlSetResizing (return previous resizing mode)
| Reported by: | hunt | Owned by: | Jon |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | Severity: | None | |
| Keywords: | Cc: |
Description
This is possible? I want to use GuiCtrlSetResizing with WinMove in my UDF and at the end of the function to set the previous resizing mode but I don't know how to get this value.
Attachments (0)
Change History (12)
comment:1 by , 16 years ago
| Version: | 3.3.6.0 |
|---|
follow-up: 11 comment:2 by , 16 years ago
What for you need it? If you set resizing mode globaly then use Opt("GUIResizeMode", mode), and set it back when you done (it will return the old option), but if you set it for specific control, why you need to change it later?
comment:3 by , 16 years ago
This example shows the problem:
GuiCtrlSetResizing($controlID, $GUI_DOCKAUTO)
; many lines of code
_WinUpdate($Form, $controlID)
; and here will resizing mode $GUI_DOCKALL, but must $GUI_DOCKAUTO
Func _WinUpdate($Form, $controlID)
GuiCtrlSetResizing($controlID, $GUI_DOCKALL)
; to do something
WinMove($Form,....)
; and here need to set initial resizing mode for a control
EndFunc
Would be great if this function will looks like:
Func _WinUpdate($Form, $controlID)
Local $previous_resizing_mode = GuiCtrlSetResizing($controlID, $GUI_DOCKALL)
; to do something
WinMove($Form,....)
GuiCtrlSetResizing($controlID, $previous_resizing_mode)
EndFunc
comment:4 by , 16 years ago
I still can not understand the purpose of this.
What should _WinUpdate do, i mean what for you are using this function?
Can you show a complete example that will show a problem (where you need the old resizing mode to solve it)?
comment:5 by , 16 years ago
Returning the previous resizing setting of the control for GUICtrlSetResizing() makes no sense.
+ Would break scripts that are relying on its current return output, success/fail.
+ Having GUICtrlSetResizing() differ in its return output compared to the other functions in its class is also a bad thing.
The real question, in my view, should be: GUICtrlGetResizing() function request ... The why question remains open. (already targeted by mscreator.)
comment:6 by , 16 years ago
MrCreatoR
I want to do function which will to adapt sizes for ListView and to resize GUI Window (_WinUpdate) depending on sizes of ListView.
I think that on above example the problem is well visible.
If not to use GuiCtrlSetResizing ($controlID, $GUI_DOCKALL) the sizes of an element will be curves after a call of function WinMove since there is other mode.
Also after using _WinUpdate it is necessary to establish a previous resizing mode for a control so user can to resize GUI and sizes of control will not changed.
mvg
It is certainly better to use GuiCtrlGetResizing since it will approach for all cases. But for mine a case has decided that it is better to use such request.
comment:7 by , 16 years ago
I want to do function which will to adapt sizes for ListView and to resize GUI Window (_WinUpdate) depending on sizes of ListView.
You can do that without using «GuiCtrlSetResizing». If you just show me an example (fully working) where you have difficulties with that, perhaps i will be able to show you a working solution, i have worked a lot with resizing controls/windows stuff.
comment:8 by , 16 years ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:12 by , 13 years ago
| Resolution: | → Rejected |
|---|---|
| Status: | assigned → closed |

Automatic ticket cleanup.