Re: [racket-users] Racket GUI: text aligned to the left of other text

2020-08-12 Thread Christopher Lemmer Webber
That's a very interesting idea... I might give that a try! Simon Schlee writes: > Another approach might be to use multiple editor-snip% > https://docs.racket-lang.org/gui/editor-snip_.html > within a pasteboard% https://docs.racket-lang.org/gui/pasteboard_.html > > Or possibly together with

Re: [racket-users] Racket GUI: text aligned to the left of other text

2020-08-12 Thread Laurent
You can also cheat by writing the name with the same color as the background on the next lines (kind of like \vphantom in LaTeX). This has the advantage of aligning based on the length of each name instead of pushing everything to the right of the longest name, while working for any font. A

Re: [racket-users] Racket GUI: text aligned to the left of other text

2020-08-12 Thread Simon Schlee
Another approach might be to use multiple editor-snip% https://docs.racket-lang.org/gui/editor-snip_.html within a pasteboard% https://docs.racket-lang.org/gui/pasteboard_.html Or possibly together with other snip instances, I currently don't have the time to experiment with it and no

Re: [racket-users] Racket GUI: text aligned to the left of other text

2020-08-11 Thread Christopher Lemmer Webber
Thanks! Yes I was looking at a route like that at first but I found that there wasn't really a way to do fancier markup like links, etc using just message% (unless I'm missing something...!) Hence my abuse of an editor that's mostly-locked (idea borrowed from the racket web browser code) ;)

Re: [racket-users] Racket GUI: text aligned to the left of other text

2020-08-11 Thread Christopher Lemmer Webber
Ah great, thank you Robby! I'll give both options a try. :) Robby Findler writes: > That code is in the framework: > https://github.com/racket/gui/blob/master/gui-lib/framework/private/text-line-numbers.rkt > > You might also consider having two text%s, one with the names and one with > the

Re: [racket-users] Racket GUI: text aligned to the left of other text

2020-08-10 Thread Justin Zamora
Another, less lightweight way is to use panels for different parts of the chat windows. I put together a sample at https://gist.github.com/zamora/1cfc6480f7703735dffa3169facfbf10 On Mon, Aug 10, 2020 at 3:32 PM Christopher Lemmer Webber wrote: > > Hello, > > I'm building a little chat

Re: [racket-users] Racket GUI: text aligned to the left of other text

2020-08-10 Thread Robby Findler
That code is in the framework: https://github.com/racket/gui/blob/master/gui-lib/framework/private/text-line-numbers.rkt You might also consider having two text%s, one with the names and one with the rest. They would scroll independently in that case, but you can hide the scrollbars on one and

[racket-users] Racket GUI: text aligned to the left of other text

2020-08-10 Thread Christopher Lemmer Webber
Hello, I'm building a little chat application with Racket. Overall Racket's GUI tools are quite comfortable, and I'm just using Rakcet's text editor stuff to build the chat. But a fairly standard thing to do with chat applications is to have text like: (Beware, fixed width ascii art ahead)