Jump to content

Recommended Posts

Posted

You guys seem too busy...so I guess I'll help out.

Here is an update of GUIBuilder with Updown control.

It's not perfect, but you can test it and fix it or I will if you find a bug.

I'll try to work on adding the other missing controls and COM components in my spare time.

  • Replies 151
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

Dammit, there's an issue with the horizontal sizing of the Updown control...I think depending on the user's desktop size. It works on 1024x768. I'll have to troubleshoot this later.

-Livewire

Posted

The bug has to do with the size of the updown control.

Is there any way to detect if the user is "using visual styles on windows and buttons"?

The size of the updown control is different in the two cases (using and not).

If not using, $offset needs to be 16.

If using, $offset needs to be 15.

See example...input+updown should not change size if you click button.

#include <GUIConstants.au3>

$offset = 16

GUICreate("GUI",-1,-1,-1,-1, $WS_SIZEBOX)

$input = GUICtrlCreateInput ("2",10,10, 200, 20)
$updown = GUICtrlCreateUpdown($input)
$button = GUICtrlCreateButton("Button",10,30,50,20)

GUISetState ()

While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $button
        $values = ControlGetPos("GUI","",$input)
        $other = ControlGetPos("GUI","",$updown)
;       MsgBox(0,"Testing","Hinput = " & $values[2] & @CRLF & "Hupdown = " & $other[2])
        GUICtrlSetPos($input,$values[0],$values[1],$values[2]+$offset,$values[3])
    Case Else
    ;;;
    EndSelect
Wend
Posted

I got it.

#include <GUIConstants.au3>

$theme = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ThemeManager","ThemeActive")
If @error Then
    $offset = 15          ; User not running Windows XP
ElseIf $theme = 0 Then
    $offset = 15          ; User running XP, but using old theme
Else
    $offset = 16          ; User running XP, using new theme
EndIf

GUICreate("GUI",-1,-1,-1,-1, $WS_SIZEBOX)

$input = GUICtrlCreateInput ("2",10,10, 200, 20)
$updown = GUICtrlCreateUpdown($input)
$button = GUICtrlCreateButton("Button",10,30,50,20)

GUISetState ()

While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $button
        $values = ControlGetPos("GUI","",$input)
        GUICtrlSetPos($input,$values[0],$values[1],$values[2]+$offset,$values[3])
    Case Else
   ;;;
    EndSelect
Wend
Posted

Here is an update that should fix the updown sizing bug. Let me know of other bugs if any. Someone try it on OS's besides XP and 2000.

Compiled with AutoIt3 version 3.1.1.64

Thanks,

Livewire

Posted

@Cyberslug or anyone who knows how...

Can you update the "IconSet.icl" with a listview, month and graphic icon. I'm trying to but can't figure out how.

Posted

Inverting mouse buttons (right->left: I'm lefthanded) via Control Panel causes an error (see the  the attached file) on resizing objects on the form.

<{POST_SNAPBACK}>

Do you get the error resizing all controls or just the ones that I added?

-Livewire

Posted

All controls. It's an old bug: I discover the cause just today.

Do you get the error resizing all controls or just the ones that I added?

-Livewire

<{POST_SNAPBACK}>

Posted

@livewire

Any chance adding a menu item to set the $gridTicks so a user can change it there instead of having to modify the code ? I prefer $gridTicks = 5 so labels and text boxes line up more evenly.

Posted

@livewire

Any chance adding a menu item to set the $gridTicks so a user can change it there instead of having to modify the code ? I prefer $gridTicks = 5 so labels and text boxes line up more evenly.

<{POST_SNAPBACK}>

Here is an update with menu item in settings to set $gridticks and also a fix for the north/south grippies on Updown+Input control.

-Livewire

Posted

Here is an update with menu item in settings to set $gridticks and also a fix for the north/south grippies on Updown+Input control.

-Livewire

<{POST_SNAPBACK}>

Not a big issue but any chance on updating the background grids to have the option of either 5 or 10 ?
Posted

Inverting mouse buttons (right->left: I'm lefthanded) via Control Panel causes an error (see the  the attached file) on resizing objects on the form.

<{POST_SNAPBACK}>

What operating system are you using?

Not a big issue but any chance on updating the background grids to have the option of either 5 or 10 ?

<{POST_SNAPBACK}>

I don't know how he generated that background, but if I figure something out, I'll add it.
Posted

Windows XP Pro Italian + security patches.

Ver 5: no more runtime errors, but now I can't resize controls. Same thing setting mouse buttons for righthanded.

What operating system are you using?

I don't know how he generated that background, but if I figure something out, I'll add it.

<{POST_SNAPBACK}>

Posted

@livewire

Any chance saving the user selections made to the menuitems such as gridticks so that when GuiBuilder starts it will set previous settings ?

<{POST_SNAPBACK}>

Yea...I was planning on adding that.

Also, your other request of changing the background is coming soon today.

-Livewire

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...