Announcement

Collapse
No announcement yet.

Plugin: ListIcon Action Plugin

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Imagine Programming
    replied
    Originally posted by T3STY View Post
    Yeah, I thought so too, but I think it won't slow down so much.
    You can also make a testing version and we'll tell you our opinion :yes
    It will slow down much, because It would have to process some sort of list with column 'rights', either allowing them to move or resize. A callback function for a control or window is called so many times each second, the list would have to be processed each time the user makes an attempt to change the column's position (any of them) or size.

    In PureBasic, processing the native array and linked list is already unstable when done in a callback (even in threadsafe), because 2 objects would have 2 seperate callbacks working in 2 seperate threads accessing the same object (e.g. linked list or array). I've had much trouble with those.

    Besides all those facts, I also don't have much time to experiment with this at this time. As you may have noticed, even SPLAX isn't released yet, I've been rather busy lately.

    Leave a comment:


  • T3STY
    replied
    Yeah, I thought so too, but I think it won't slow down so much.
    You can also make a testing version and we'll tell you our opinion :yes

    Leave a comment:


  • Imagine Programming
    replied
    Originally posted by T3STY View Post
    Also, I can Drag&Drop the icons column (HeaderDragDrop is set to true) and I'd like this to not be possible.
    It's either move all the columns, or none Just like the resizing, it's either resizing all, or none. There should be a way, however that would add much more code to the callback system, in which I check which column is allowed to resize and move. This could slow down the callback a bit

    Leave a comment:


  • T3STY
    replied
    Yes, I made a function which creates a table with all the items the ListIcon contains, but it was a pain until I discovered that the ListIcon starts from a 0-based index instead of 1-based index like the ListBox object..
    So, flick or nothing ? I can live with that, I won't use my application by only resizing the window, right ? :yes

    As a suggestion for further versions: Fixed column width and position.
    I am adding items with icons and I'd like to have the Icons separated in a column; I have created it but at runtime I can resize the icons column and it's not really good/cool. A fixed column width would be great to avoid this. Also, I can Drag&Drop the icons column (HeaderDragDrop is set to true) and I'd like this to not be possible.

    Anyhow, a good plugin, it came helpful to me :yes
    Thanks

    Leave a comment:


  • Imagine Programming
    replied
    Originally posted by T3STY View Post
    2 more questions:
    1) is there a way to store data without the need of using a separated field? (like the ListBox ItemData)
    2) When resizing it flickers, a lot; Can I somehow stop it flickering ?
    Question in post 1, I could.
    Post 2:
    1) Sure, use a table. TableName[ListIconRow+1] = Data By default, a listicon item can contain data, however only an integer. This could point to a string, but then only strings would be supported. And cleaning up the memory would be a pain to maintain. However, the table alternative is nicer (IMHO), because you can store any kind of data there
    2) I'm sorry, but I don't think so. I'm capturing the resize event of the host control, and resize the listicon control to the same dimensions as the host. The redrawing of the control is done by the host of the ListBox, because if you look at ProgressEx, it doesn't flicker while it's using the same system.

    Leave a comment:


  • T3STY
    replied
    2 more questions:
    1) is there a way to store data without the need of using a separated field? (like the ListBox ItemData)
    2) When resizing it flickers, a lot; Can I somehow stop it flickering ?

    Leave a comment:


  • T3STY
    replied
    Bas, could you define those functions in the plugin source so when functions will be defined in AMS will be replaced by the new ones? This would prevent errors like this

    Leave a comment:


  • Imagine Programming
    replied
    Thanks guys, I saw the post and the issue is already solved haha

    Leave a comment:


  • T3STY
    replied
    Oh .. lol.. I haven't noticed those on the globals.. sorry!
    Thanks for help

    Leave a comment:


  • .74
    replied
    Originally posted by T3STY View Post
    hey Bas, I got a problem... a big one. When I click on the object it just destroys the application window (application exits). I have used this code:
    Code:
    local tblFlags = {};
    tblFlags.GridLines = true;
    tblFlags.FullRowSelect = true;
    tblFlags.AlwaysShowSelection = true;
    tblFlags.CheckBoxes = true;
    
    ListIcon.Create("ListIcon1", "Test", 350, tblFlags);
    And it caused the application to exit. I thought it was because of the table, and I have tried like this:
    Code:
    ListIcon.Create("ListIcon1", "Test", 350, {GridLines = true, FullRowSelect = true, AlwaysShowSelection = true, CheckBoxes = true});
    But I got the same result; Even with nil (no properties table) it exits (or crashes?).

    The strange thing is that the example you provided works fine.. any chance to get it working ?

    Win. Version: Seven Professional x64
    AMS Version: PE 8.0.2.0
    Here it is:

    Originally posted by Imagine Programming View Post

    The Events section of the manual contains a complete template of the event functions.
    That's the code below here, which is the standard code for events:
    Code:
    if(not ListIconEvent)then
    ListIconEvent = {}
    end
    function ListIconEvent.OnHeaderClick(ObjectName, Column)
    
    end
    function ListIconEvent.OnChecked(ObjectName, Row, boolChecked)
    
    end
    function ListIconEvent.OnRightClick(ObjectName, Row)
    
    end
    function ListIconEvent.OnSelect(ObjectName, Row)
    
    end
    function ListIconEvent.OnKillFocus(ObjectName)
    
    end
    function ListIconEvent.OnDoubleRightClick(ObjectName, Row)
    
    end
    function ListIconEvent.OnKey(ObjectName, e_Key)
    
    end
    function ListIconEvent.OnDoubleClick(ObjectName, Row)
    
    end
    function ListIconEvent.OnSetFocus(ObjectName)
    
    end
    function ListIconEvent.OnReturn(ObjectName, Row)
    
    end
    function ListIconEvent.OnHeaderRightClick(ObjectName, Column)
    
    end
    function ListIconEvent.OnColorRequest(Object, Row, Column)
        return {Back = -1, Text = -1};
    end

    Leave a comment:


  • Sakuya
    replied
    Originally posted by T3STY View Post
    hey Bas, I got a problem... a big one. When I click on the object it just destroys the application window (application exits). I have used this code:
    Code:
    local tblFlags = {};
    tblFlags.GridLines = true;
    tblFlags.FullRowSelect = true;
    tblFlags.AlwaysShowSelection = true;
    tblFlags.CheckBoxes = true;
    
    ListIcon.Create("ListIcon1", "Test", 350, tblFlags);
    And it caused the application to exit. I thought it was because of the table, and I have tried like this:
    Code:
    ListIcon.Create("ListIcon1", "Test", 350, {GridLines = true, FullRowSelect = true, AlwaysShowSelection = true, CheckBoxes = true});
    But I got the same result; Even with nil (no properties table) it exits (or crashes?).

    The strange thing is that the example you provided works fine.. any chance to get it working ?

    Win. Version: Seven Professional x64
    AMS Version: PE 8.0.2.0
    I think you have to define the events too.

    Leave a comment:


  • T3STY
    replied
    hey Bas, I got a problem... a big one. When I click on the object it just destroys the application window (application exits). I have used this code:
    Code:
    local tblFlags = {};
    tblFlags.GridLines = true;
    tblFlags.FullRowSelect = true;
    tblFlags.AlwaysShowSelection = true;
    tblFlags.CheckBoxes = true;
    
    ListIcon.Create("ListIcon1", "Test", 350, tblFlags);
    And it caused the application to exit. I thought it was because of the table, and I have tried like this:
    Code:
    ListIcon.Create("ListIcon1", "Test", 350, {GridLines = true, FullRowSelect = true, AlwaysShowSelection = true, CheckBoxes = true});
    But I got the same result; Even with nil (no properties table) it exits (or crashes?).

    The strange thing is that the example you provided works fine.. any chance to get it working ?

    Win. Version: Seven Professional x64
    AMS Version: PE 8.0.2.0

    Leave a comment:


  • Imagine Programming
    replied
    Originally posted by mystica View Post
    Hmmm, another great plugin where i was late to the party.
    This is really nice.
    Thanks to both IP & Riz for this.
    Yes, where were you all this time, did you even think about how worried I could have been about you!!!?
    Seriously, I haven't seen you in a while

    Leave a comment:


  • mystica
    replied
    Hmmm, another great plugin where i was late to the party.
    This is really nice.
    Thanks to both IP & Riz for this.

    Leave a comment:


  • Imagine Programming
    replied
    Ah good The part where you've found another workaround that is :yes

    Leave a comment:

Working...
X