Modify

Opened 14 years ago

Closed 11 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 Changed 14 years ago by TicketCleanup

  • Version 3.3.6.0 deleted

Automatic ticket cleanup.

comment:2 follow-up: Changed 14 years ago by MrCreatoR <mscreator@…>

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 Changed 14 years ago by anonymous

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 Changed 14 years ago by MrCreatoR <mscreator@…>

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 Changed 14 years ago by mvg

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 Changed 14 years ago by anonymous

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 Changed 14 years ago by MrCreatoR <mscreator@…>

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 Changed 14 years ago by Jpm

  • Owner set to Jon
  • Status changed from new to assigned

comment:9 Changed 12 years ago by ifbhaamw <sample@…>

1

comment:10 in reply to: ↑ description Changed 12 years ago by ifbhaamw <sample@…>

1

comment:11 in reply to: ↑ 2 Changed 12 years ago by ifbhaamw <sample@…>

1

comment:12 Changed 11 years ago by Jon

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

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 Jon.
Author


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

 
Note: See TracTickets for help on using tickets.