What do you mean by "fishy"; I don't quite understand your comments.It is there, in the source code.
Looking at the code you posted it is obvious to me that the function is internal to lazarus only.
And, just to be clear, I can use this to assign native button icons to my buttons? As seen in most applications:http://www.murga-linux.com/puppy/viewtopic.php?mode=attach&id=87914&sid=9f2cbd42c2cd004542ce5eec3b7dda9bThe above icon set if GNOME or GTK is the theme/DE.If you believe that this is the function that I'm after, how do I call it at (I presume) From Create to assign a given icon to my button?Cheers.
Quote from: A on January 07, 2018, 01:55:02 pmAnd, just to be clear, I can use this to assign native button icons to my buttons? As seen in most applications:http://www.murga-linux.com/puppy/viewtopic.php?mode=attach&id=87914&sid=9f2cbd42c2cd004542ce5eec3b7dda9bThe above icon set if GNOME or GTK is the theme/DE.If you believe that this is the function that I'm after, how do I call it at (I presume) From Create to assign a given icon to my button?Cheers.No. The icons loaded from that function are resources compiled in the exe not system icons.
Well, whether the function should have more error checking or not..., that is not really relevant to the question.You call the function like any other function.1) add the unit to your uses clause (if not already there)2) call it from your code (to be save prefix with unit name)Code: Pascal [Select]someBitMapVar := Buttons.GetDefaultButtonIcon(someId);The more important questions would be:A) What ID do you want? That you have to know yourselfB) What to do with the result. (How to get it displayed on your Button, or where ever you need it)You can do whatever you want to it. You may (depending on what you do) have to make sure that you free the bitmap, when it is no longer used. But maybe if you pass the bitmap to some other function, then that will take care. You have to investigate that.Otherwise, I don't know what your question is.If it is A or B, then I you may want to clarify this, and maybe someone can answer that.Quote from: taazz on January 07, 2018, 01:51:06 pmLooking at the code you posted it is obvious to me that the function is internal to lazarus only.It is in the interface part of Buttons. So I would assume it can be used.Yet true, it has a comment: "Helper....", so it is possible that it was intended more private, and may become unavailable in the future...