Jump to content

IDE for GUI: Any coders?


CyberSlug
 Share

Recommended Posts

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.

Link to comment
Share on other sites

  • Replies 151
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

@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

Link to comment
Share on other sites

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 ?
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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}>

Link to comment
Share on other sites

@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

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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