Modify

Opened 16 years ago

Closed 13 years ago

Last modified 13 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

Attachments (0)

Change History (8)

comment:1 by J-Paul Mesnage, 16 years ago

Milestone: 3.3.7.0
Owner: set to J-Paul Mesnage
Resolution: Fixed
Status: newclosed

Fixed by revision [5899] in version: 3.3.7.0

comment:2 by J-Paul Mesnage, 15 years ago

Resolution: Fixed
Status: closedreopened

comment:3 by TicketCleanup, 15 years ago

Milestone: 3.3.7.0

Automatic ticket cleanup.

comment:4 by Emiel Wieldraaijer, 14 years ago

The following also does not work

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

comment:5 by Melba23, 14 years ago

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 by Emiel Wieldraaijer, 14 years ago

@Melba23

Works perfect

Thnx

Best Regards,

Emiel

comment:7 by Jon, 13 years ago

Milestone: 3.3.9.7
Owner: changed from J-Paul Mesnage to Jon
Resolution: Fixed
Status: reopenedclosed

Fixed by revision [7849] in version: 3.3.9.7

comment:8 by Jon, 13 years ago

Fixed by revision [7850] in version: 3.3.9.7

Modify Ticket

Action
as closed The owner will remain Jon.

Add Comment


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