AutoHotkey Community

It is currently May 27th, 2012, 12:51 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 136 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8, 9, 10  Next
Author Message
 Post subject:
PostPosted: October 6th, 2011, 8:45 am 
Offline

Joined: October 13th, 2009, 10:09 pm
Posts: 1389
Yes it's wrong, Menu is not a function but a key:
Code:
this.Menu := this.Menu1


BTW, I suggest always getting the docs from the GitHub repository right now. As this library is still in active development, some things are expected to change and I can't keep the online library up to date all the time. I could probably write a script to automate it, but I'd rather work on the lib itself.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 6th, 2011, 2:30 pm 
Offline

Joined: December 19th, 2010, 5:32 am
Posts: 235
I tried doing that and the menu doesn't appear on the gui, and there are no docs for CMenu.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 6th, 2011, 9:55 pm 
Offline

Joined: October 13th, 2009, 10:09 pm
Posts: 1389
I think I made a mistake in committing the docs, forgot to add newly generated files... DOH :P

Well anyway, I thought you wanted to add a context menu for which I gave you a description. The function previously known as Menu() is now available as AddMenuBar(CMenuInstance).

I'll make sure to commit all the latest docs.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 8th, 2011, 6:50 am 
Offline

Joined: December 19th, 2010, 5:32 am
Posts: 235
Slider event doesn't seem to be working.
Example:
Code:
gui := new Form1()
#include <CGUI>
Class Form1 Extends CGUI
{
    __New()
    {
        delaySlider := this.AddControl("Slider", "delaySlider", "x52 y73 w392 h29 Range1-5000", "")
        this.Title := "Form1"
        this.Show()
    }

    delaySlider_SliderMoved() {
            MsgBox, The slider has moved.
        }
}


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 8th, 2011, 12:52 pm 
Offline

Joined: October 13th, 2009, 10:09 pm
Posts: 1389
Thanks, fixed.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 8th, 2011, 7:00 pm 
Offline

Joined: December 19th, 2010, 5:32 am
Posts: 235
I can't get the value from the slider control, when ever I try the following code with the previous example I get a blank message box.
Code:
MsgBox, % this.delaySlider.Value


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 8th, 2011, 11:46 pm 
Offline

Joined: October 13th, 2009, 10:09 pm
Posts: 1389
Yes. You did not create an instance variable in your constructor. Try using this.delaySlider := ...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 8th, 2011, 11:55 pm 
Offline

Joined: December 19th, 2010, 5:32 am
Posts: 235
Well I feel stupid now... :oops:
Thanks for pointing that out fragman.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 8th, 2011, 11:57 pm 
Offline

Joined: October 13th, 2009, 10:09 pm
Posts: 1389
No problem, I'm sure there are still more bugs in my library :D
It would really help to have some unit tests for them I suppose, but I don't really have the time, lots of other things to work on...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 9th, 2011, 12:04 am 
Offline

Joined: December 19th, 2010, 5:32 am
Posts: 235
I'd help put together unit tests for them, but I have no idea what "unit tests" are. :(


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 9th, 2011, 12:39 am 
Offline

Joined: October 13th, 2009, 10:09 pm
Posts: 1389
Automated testing, to help find regression bugs, verify that features are working and similar problems. I think there are one or two frameworks for it on the forums.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 15th, 2011, 1:25 pm 
Offline

Joined: October 13th, 2009, 10:09 pm
Posts: 1389
I fixed various bugs and implemented some missing features in ListView controls.

Unfortunately I also had to disable focus change and control content validation features.

I integrated the SysLink control class by HoppFrosch but due to the same issue mentioned above it can't handle click events properly....:(


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 16th, 2011, 5:50 am 
Offline

Joined: December 19th, 2010, 5:32 am
Posts: 235
Is it possible to have a gui owned by another gui flash and not loose focus when trying to switch back to the owner gui?
In the example below I'm trying to make it when the slave window is activated and I try to activate the owner it will not loose focus, like in 7plus when editing an event.
Code:
#SingleInstance, force
gui := new Form1()

#include <CGUI>

Class Form1 Extends CGUI
{

    button1 := this.AddControl("Button", "button1", "w150 h30", "Click me!")

    __New()
    {
        this.Title := "Onwer"
        this.Show()

        this.hwnd := WinActive("A")
        this.Slave := new SlaveWindow(this.hwnd)
    }

    button1_Click() {
        this.Slave.Show()
    }
}

class SlaveWindow extends CGUI
{
    text1 := this.AddControl("Text", "text1", "w100 h20", "I am the slave window.")

    __New(Owner) {
        this.Owner := owner, this.OwnerAutoClose := 1, this.MinimizeBox := 0
    }
}


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 16th, 2011, 10:37 pm 
Offline

Joined: October 13th, 2009, 10:09 pm
Posts: 1389
Are you talking about modal windows?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 16th, 2011, 10:42 pm 
Offline

Joined: December 19th, 2010, 5:32 am
Posts: 235
Yes, I didn't know the name for them, I got it working now thanks.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 136 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8, 9, 10  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: hughman, rrhuffy and 4 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group