How to create a button using an .ico file? Topic is solved

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
cgx5871
Posts: 319
Joined: 26 Jul 2018, 14:02

How to create a button using an .ico file?

25 Feb 2024, 10:07

Code: Select all

g:=gui()
g.add("button")   ;    ;b8.ico
g.show
For example, to add a button, use the test.ico style.
Inherit its transparency and border styles?

I only know that Picture can add .ico, but it has no button effect
Last edited by cgx5871 on 25 Feb 2024, 10:10, edited 1 time in total.
User avatar
mikeyww
Posts: 27324
Joined: 09 Sep 2014, 18:38

Re: How to create a button using an .ico file?

25 Feb 2024, 10:10

An icon file is an image or set of images. An icon is not a style. You would need to determine what borders, etc. you want to use. You can add an image as a GUI :arrow: picture and then set an event for it. I would have a look at the documentation to understand what can be done with these picture controls in terms of transparency and other functionality.
cgx5871
Posts: 319
Joined: 26 Jul 2018, 14:02

Re: How to create a button using an .ico file?

25 Feb 2024, 10:15

image.png
image.png (27.49 KiB) Viewed 245 times
Picture can add .ico, but it has no button display effect

I saw Scite's toolbar, which perfectly displays the style and border of icons.
What is it implemented with?
User avatar
mikeyww
Posts: 27324
Joined: 09 Sep 2014, 18:38

Re: How to create a button using an .ico file?

25 Feb 2024, 10:18

I do not use SciTE. Others here may know more.
User avatar
boiler
Posts: 17343
Joined: 21 Dec 2014, 02:44

Re: How to create a button using an .ico file?

25 Feb 2024, 10:27

Here is the source code for SciTE4AutoHotkey's toolbar in case you want to emulate it.
cgx5871
Posts: 319
Joined: 26 Jul 2018, 14:02

Re: How to create a button using an .ico file?

25 Feb 2024, 13:23

@XMCQCX
So amazing
This is exactly what I want, thank you

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: No registered users and 20 guests