Want to change Racket GUI application title (on the taskbar)

67 views
Skip to first unread message

JavaCommons

unread,
Nov 23, 2020, 1:25:10 AM11/23/20
to Racket Users

When I build Racket (scheme) GUI application like this:

raco exe --gui gui-01.rkt

Windows taksbar displays the name of the application as "Racket GUI application". I want to change this name to something like "My GUI Program". Is this possible?

無題.png

KOKOU AFIDEGNON

unread,
Nov 23, 2020, 4:30:20 AM11/23/20
to JavaCommons, Racket Users
can you check on frame% label ?

--
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/8a775b49-8bb3-4ffb-95b4-09d43ffcc637n%40googlegroups.com.

JavaCommons

unread,
Nov 23, 2020, 5:39:37 AM11/23/20
to Racket Users
> can you check on frame% label ?

Sorry for my bad explanation.

When I run gui-01.exe I get frame label as title; but when I close the program after pinning to taskbar, problem occurs.
Anyway, thanks for your advise.

無題2.png



----- gui-01.rkt -----

#lang racket

(require racket/gui)


(define frame (new frame%
                   [label "My GUI Program"]
                   [width 400]
                   [height 300]
                   ))

(define list-box (new list-box%
                      (label "List Box")
                      (parent frame)
                      (choices (list "Item 0"
                                     "Item 1"
                                     "Item 2"))
                      (style (list 'single
                                   'column-headers))
                      (columns (list "First Column"))
                      [callback (lambda (button event)
                                  (println (send event get-event-type))
                                  (send msg set-label "Listbox click"))]
                      ))

(define msg (new message% [parent frame]
                 [label "No events so far..."]))

(define btn (new button% [parent frame]
                 [label "Click Me"]
                 [callback (lambda (button event)
                             (println (send event get-event-type))
                             (send msg set-label "Button click"))]))

(send frame show #t)

2020年11月23日月曜日 18:30:20 UTC+9 kokou.a...@gmail.com:

JavaCommons

unread,
Nov 23, 2020, 5:55:46 AM11/23/20
to Racket Users
The big problem is when you distribute several racket gui applications as executables, the user cannnot distinguish applications (he does not know which application (icon) to click on the taskbar).

2020年11月23日月曜日 18:30:20 UTC+9 kokou.a...@gmail.com:
can you check on frame% label ?

JavaCommons

unread,
Nov 23, 2020, 11:05:02 AM11/23/20
to Racket Users

electron/rcedit solved the problem. With this solution, taskmanager's display also became "My GUI Program".

https://github.com/electron/rcedit/releases/tag/v1.1.1

[for 32bit racket] rcedit-x86.exe gui-01.exe --set-version-string FileDescription "My GUI Program"

[for 64bit racket] rcedit-x64.exe gui-01.exe --set-version-string FileDescription "My GUI Program"


2020年11月23日月曜日 15:25:10 UTC+9 JavaCommons:

Stephen De Gabrielle

unread,
Nov 23, 2020, 7:16:54 PM11/23/20
to JavaCommons, Racket Users
Hi

I think you can use 'gracket-launcher-names' to set a distinct name

I think that is how it is done for the plt-games executable  https://github.com/racket/games/blob/master/info.rkt

It also set an icon 

I think you can also use --ico .ico-path› to set a distinct icon of you own

I'm not a windows user but I'm guessing; 

raco exe --gui --ico .ico-path hello.rkt


I'm sorry I don't have a windows machine so I can't test this.

Kind regards

Stephen




--
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages