racket / racket/gui

list-box% label width in Windows/OS X

Open
#107 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Racket
Stars
68
Forks
82
PR merge metrics
No merged PRs in 30d

Description

The label width in a list-box% never changes from its default in Windows and OS X. Consider the following code:

#lang racket/base
(require racket/class
         racket/gui/base)

(define frame
  (new frame%
       [label "foo"]
       [width 300]
       [height 400]))

(define lbox
  (new list-box%
       [parent frame]
       [label "123"]
       [choices '("a" "b" "c")]
       [style '(single vertical-label)]
       [callback (λ (lb evt)
                 (send lb set-label "123456"))]))

(send frame show #t)

On Gentoo, the label changes properly from "123" to "123456", yet on Windows and OS X the label appears unchanged, but what is actually happening is the label is changed and the width of the label is unchanged.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the supplied racket/gui/base example on Windows and OS X, then compare the label behavior with Gentoo. Trace the list-box% vertical-label update path and platform-specific width handling; done means changing the label also updates its visible width on the affected platforms.

Written by the indexing model from the issue text.

Assessment

Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.