chicken-users
[Top][All Lists]
Advanced

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

Re: How to do formatting in iup textbox?


From: Matt Welland
Subject: Re: How to do formatting in iup textbox?
Date: Fri, 4 Feb 2022 13:36:04 -0500

On Thu, Feb 3, 2022 at 6:29 PM Vasilij Schneidermann <mail@vasilij.de> wrote:
Hello Matt,

> What is the equivalent to iup.user in the Chicken iup egg?

The egg doesn't have a binding for "IupUser", so you'd need to expose
that first.

Ok. That makes sense. 

> Or more generally, how to apply formatting to text in the textbox widget?

Should be a manner of using `attribute-set!` on the widget.

I thought it should be possible to just use attribute-set! and perhaps it is. However I have not been able to figure it out. In the lua example the formatting attributes are set on the user object which is somehow attached to the text widget. 

I tried something like this:

 (attribute-set! x "ADDFORMATTAG" "\"ALIGNMENT\" = \"CENTER\"")
 (attribute-set! x "ADDFORMATTAG" "\"SELECTION\" = \"1,1:3,50\"")

But it doesn't appear to make any difference. Suggestions?

Thanks,
Matt
-=-

Vasilij


--
--
Complexity is your enemy. Any fool can make something complicated.
It is hard to keep things simple. - Richard Branson.

reply via email to

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