This commit is contained in:
2025-08-06 13:51:10 +02:00
parent 01211e9aa7
commit a9e6434d81
2 changed files with 12 additions and 4 deletions

View File

@@ -22,8 +22,8 @@
(letrec ((adder (lambda (col) (letrec ((adder (lambda (col)
(when (< col columns) (when (< col columns)
(new horizontal-pane% [parent new-pane] [stretchable-width #t] (new horizontal-pane% [parent new-pane] [stretchable-width #t]
[alignment (list (column-alignment* col) 'center)])) [alignment (list (column-alignment* col) 'center)])
(adder (+ col 1))))) (adder (+ col 1))))))
(adder 0)) (adder 0))
(set! creating-row #f) (set! creating-row #f)
new-pane) new-pane)
@@ -139,6 +139,7 @@
;(define lbl1 (new message% [parent g] [label "This is lbl 1"])) ;(define lbl1 (new message% [parent g] [label "This is lbl 1"]))
;(define btn2 (new button% [parent g] [label "Btn 2"])) ;(define btn2 (new button% [parent g] [label "Btn 2"]))
;(define g2-lbl (new message% [parent g] [label "This is something else then a gauge"]))
;(define lbl2 (new message% [parent g] [label "This is lbl 2"])) ;(define lbl2 (new message% [parent g] [label "This is lbl 2"]))
;(send win show #t) ;(send win show #t)

View File

@@ -32,12 +32,19 @@ See also @racket[pane%].
[stretchable-height any/c #t])]{ [stretchable-height any/c #t])]{
} }
@defmethod*[([(min-width (c column-index) [w dimenstion-integer?]) dimension-integer?])]{ @defmethod*[([(column-min-width (c column-index) [w dimenstion-integer?]) dimension-integer?])]{
Gets or sets the minimum width (in pixels) of the given column c. Gets or sets the minimum width (in pixels) of the given column c.
Returns the currently set minimum width for the given column. Returns the currently set minimum width for the given column.
} }
@defmethod*[([(column-align (c column-index) [align <- (or/c 'left 'center 'right)]) (or/c 'left 'center 'right) ])]{
Gets or sets the horizontal alignment of a given column c.
Returns the currently set alignment.
Note. Use this right after declaring the columns pane and before adding any children.
}
} }