Modify

Opened 15 years ago

Closed 12 years ago

Last modified 12 years ago

#1698 closed Bug (Fixed)

GUICtrlSetLimit, limit 32767

Reported by: anonymous Owned by: Jon
Milestone: 3.3.9.7 Component: AutoIt
Version: 3.3.6.1 Severity: None
Keywords: GUICtrlSetLimit Cc:

Description

http://www.autoitscript.com/forum/index.php?showtopic=20647&st=0&p=142742&hl=GUICtrlSetLimit%2032767

; OK - 1..32767
$updown = GUICtrlCreateUpdown($input)
GUICtrlSetLimit($updown, 32767, 1)

; bug - 1,0,-1..-32768
$updown = GUICtrlCreateUpdown($input)
GUICtrlSetLimit($updown, 32768, 1)

; bug - 1,0,-1..-32766
$updown = GUICtrlCreateUpdown($input)
GUICtrlSetLimit($updown, 32770, 1)

Solution:
http://www.autoitscript.com/forum/index.php?showtopic=105296&view=findpost&p=756004

Thank you very much

Change History (8)

comment:1 Changed 15 years ago by Jpm

  • Milestone set to 3.3.7.0
  • Owner set to Jpm
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [5899] in version: 3.3.7.0

comment:2 Changed 14 years ago by Jpm

  • Resolution Fixed deleted
  • Status changed from closed to reopened

comment:3 Changed 14 years ago by TicketCleanup

  • Milestone 3.3.7.0 deleted

Automatic ticket cleanup.

comment:4 Changed 13 years ago by Emiel Wieldraaijer

The following also does not work

$1 = GUICtrlCreateInput("3389", 235, 200, 150, 20)
$2 = GUICtrlCreateUpdown($1, $UDS_NOTHOUSANDS)
GUICtrlSetLimit($2, 49151, 1024)

comment:5 Changed 13 years ago by Melba23

But this does:

; Credit to PenDragyn21

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <UpdownConstants.au3>

$hGUI = GUICreate("Test", 500, 500)

GUICtrlCreateInput("49999", 10, 10, 200, 20)
$hUD = GUICtrlCreateUpdown(-1, BitOr($UDS_NOTHOUSANDS, $UDS_WRAP))
_GUICtrlUpdownSetRange32($hUD, -50000, 50000)

GUISetState()

While 1
	Switch GUIGetMsg()
		Case $GUI_EVENT_CLOSE
			Exit
	EndSwitch
WEnd

Func _GUICtrlUpdownSetRange32($h_updown=0, $i_Low=-999999, $i_High=999999)
    Const $UDM_SETRANGE32 = $WM_USER + 111
    GUICtrlSendMsg($h_updown, $UDM_SETRANGE32, $i_Low, $i_High)
EndFunc

comment:6 Changed 13 years ago by Emiel Wieldraaijer

@Melba23

Works perfect

Thnx

Best Regards,

Emiel

comment:7 Changed 12 years ago by Jon

  • Milestone set to 3.3.9.7
  • Owner changed from Jpm to Jon
  • Resolution set to Fixed
  • Status changed from reopened to closed

Fixed by revision [7849] in version: 3.3.9.7

comment:8 Changed 12 years ago by Jon

Fixed by revision [7850] in version: 3.3.9.7

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

Author


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

 
Note: See TracTickets for help on using tickets.