Ahhhh, ok thank you very much. By the way, when I make a tab-panel with multiple tabs and add a list-box to the tab-panel it appears on all tab pages. So how can I specify the tab/tabindex as parent to the list-box? And is it possible to init the list-box with more choices as one. In the example in the doc there is a initialisation only for one column. I would like to init say 4 columns with data(as vector or map??). For this I don´t found any example, and I hope you could give me the place where it stays or an suggestion..
Yours, -------- Original-Nachricht -------- > Datum: Thu, 20 Dec 2012 12:44:52 +0100 > Von: Laurent <laurent.ors...@gmail.com> > An: murat demirtas <herak...@gmx.de> > CC: racket <users@racket-lang.org> > Betreff: Re: [racket] label-string > Hi, > > From the Help Desk: > (new tab-panel% > [choices choices] > [...] > > → (is-a?/c tab-panel%) > choices : (listof label-string?) > > So it wants a list of label-string. > Then clicking on `label-string?` gives: > > """ > (label-string? v) → boolean? > > v : any/c > Returns #t if v is a string whose length is less than or equal to 200. > > This predicate is typically used as the contract for strings that appear > in > GUI objects. In some cases, such as the label in a button% or menu-item% > object, the character & is treated specially to indicate that the > following > character is used in keyboard navigation. See set-label in > labelled-menu-item<%> for one such example. In other cases, such as the > label on a frame%, & is not treated specially. > """ > > So you could do the following: > > (define tab-panel (new tab-panel% > (parent dialog) > (choices (map ~a (vector->list Vec))))) > > Laurent > > On Thu, Dec 20, 2012 at 12:19 PM, <herak...@gmx.de> wrote: > > > Hello friends, > > > > how can I convert a vector (define Vec #(1 2 3 4)) > > > > to a label-string to make a tab-panel?? > > > > I try this > > (define tab-panel (new tab-panel% > > (parent dialog) > > (choices (vector->list Vec)))) > > > > but it fails due to contract violation: expected: label-string? > > > > So what ist a label-string??? > > > > > > Yours, > > ____________________ > > Racket Users list: > > http://lists.racket-lang.org/users > > ____________________ Racket Users list: http://lists.racket-lang.org/users