texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texmacs-dev] Widgets


From: Michael Klein
Subject: Re: [Texmacs-dev] Widgets
Date: Mon, 3 Sep 2007 16:50:50 +0200

Hello Joris,

yes I can. I do it with a parameter like this
(tm-build-widget (message-widget error-text)
  ,error-text
  ===
  (bar
   >>>
  (button "Done" (dismiss))))

(define (display-message list-of-messages)
  (let* ((error-text ""))
    (for-each (lambda (i)
       (set! error-text (string-append error-text i "\n")))
    list-of-messages)
    (widget-popup "message" `(message-widget ,error-text))))

This adds the text to the widget but it does not respect the linebreaks.

Best regards
Michael


2007/9/3, Joris van der Hoeven <address@hidden>:
Hi Michael,

On Mon, Sep 03, 2007 at 03:48:16PM +0200, Michael Klein wrote:
> I have a question concerning widgets:
> If I use tm-build-widget to construct a widget like this
> (tm-build-widget (message-widget)
>   "Some Text"
>   ===
>   (bar
>      >>>
>      (button "Done" (dismiss))))
>
> And I want to later change the text and then display the widget.
> How can I do this?

Can you give a more detailed example on what you want?
Fundamentally, you have the choice between making your text editable and
between rebuilding the widget by adding a parameter to "message-widget".
I cannot recommend which way to go without more information.

Best wishes, Joris


_______________________________________________
Texmacs-dev mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/texmacs-dev


reply via email to

[Prev in Thread] Current Thread [Next in Thread]