align
This commit is contained in:
5
main.rkt
5
main.rkt
@@ -22,8 +22,8 @@
|
||||
(letrec ((adder (lambda (col)
|
||||
(when (< col columns)
|
||||
(new horizontal-pane% [parent new-pane] [stretchable-width #t]
|
||||
[alignment (list (column-alignment* col) 'center)]))
|
||||
(adder (+ col 1)))))
|
||||
[alignment (list (column-alignment* col) 'center)])
|
||||
(adder (+ col 1))))))
|
||||
(adder 0))
|
||||
(set! creating-row #f)
|
||||
new-pane)
|
||||
@@ -139,6 +139,7 @@
|
||||
;(define lbl1 (new message% [parent g] [label "This is lbl 1"]))
|
||||
|
||||
;(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"]))
|
||||
|
||||
;(send win show #t)
|
||||
|
||||
@@ -32,12 +32,19 @@ See also @racket[pane%].
|
||||
[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.
|
||||
|
||||
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.
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user