Re: [racket-users] Editor-canvas% how to set default style and use set-line-count correctly?

2017-01-26 Thread WarGrey Gyoudmon Ju
On Fri, Jan 27, 2017 at 1:46 AM, WarGrey Gyoudmon Ju wrote: > > (send card insert (make-object string-snip% "it's a bug of text%, > snip's style is not (convert)ed, also affects the following inputs") > All right, it is not a bug, it's just how it works. the snip's style

Re: [racket-users] Editor-canvas% how to set default style and use set-line-count correctly?

2017-01-26 Thread WarGrey Gyoudmon Ju
Update: this solution does work. I just found the reason why it did not work before. (define digivice (new frame% [width 800] [height 600] [label "Standard Style"])) (define card (make-object text%)) (define darc (new editor-canvas% [parent digivice] [editor card] [style '(no-border auto-hscroll

Re: [racket-users] Editor-canvas% how to set default style and use set-line-count correctly?

2017-01-26 Thread WarGrey Gyoudmon Ju
I have these two helpers (typed racket makes it a little verbose). (define change-style : (->* ((Instance Style<%>)) (#:font (Option (Instance Font%)) #:color (Option (Instance Color%)) #:background-color

[racket-users] Editor-canvas% how to set default style and use set-line-count correctly?

2017-01-26 Thread Erich Rast
Hi, I have an editor-canvas% subclass and want to set the default style, but adding it with name "Standard" to the-style-list doesn't work. Do I have to replace the style list of the canvas with a new one? Or does the default style of an editor-canvas% have to be called differently? "Basic"?