original commit: ec9f45916731bf8bfba93d4636c8d9f34229fc26
This commit is contained in:
Matthew Flatt 2004-11-24 03:05:31 +00:00
parent 54a050ca57
commit 5fce132ad8
2 changed files with 10 additions and 0 deletions

View File

@ -5408,6 +5408,7 @@
(unless (and (list? l) (andmap label-string? l))
(raise-type-error (who->name '(method tab-panel% set))
"list of strings (up to 200 characters)" l))
(set! save-choices (map string->immutable-string l))
(send (mred->wx tabs) set l)))]
[get-item-label (entry-point
(lambda (i)

View File

@ -1947,6 +1947,15 @@
(send p set-selection (sub1 (send p get-number)))))
(make-object button% "Rename" p2 (lambda (b e)
(send p set-item-label (quotient (send p get-number) 2) "Do&nut")))
(make-object button% "Labels" p2 (lambda (b e)
(printf "~s~n"
(reverse
(let loop ([i (send p get-number)])
(if (zero? i)
null
(cons (send p get-item-label (sub1 i)) (loop (sub1 i)))))))))
(make-object button% "Set" p2 (lambda (b e)
(send p set '("New One" "New Second" "New Third"))))
(when no-border?
(make-object button% "Toggle" p2 (lambda (b e)
(if on?