Hi all,
With the test case below, I am able to format the text. But another
goal is to change the text fgcolor same with the laszlo debugger's
(info: "blue", warn:"yellow"..)
I am trying to do this like that. But I donT see the text as yellow.
Am I missing something, or is there another useful solution about this
issue?
Thanks in advance

<canvas>
        <debug name="myDebugger" width="400" height="250"/>
        <class name="debuggerWindow">
                <window name="notificationWindow" title="Notification Window"
                        width="250" height="400" resizable="true" clip="true">
                        <vscrollbar />
                        <text name="messageArea" multiline="true"
                                selectable="true" clickable="true"
                                width="${parent.width-30}"/>
                </window>
                <text name="message" fgcolor="#FFFF00">
                        <attribute name="info" type="color" value="yellow"/>
                        <attribute name="error" type="color" value="red"/>
                        <attribute name="warn" type="color" value="blue"/>
                </text>
                <method name="addMessage" args="type, msg">
                        /*switch (type) {
                                case message.info :
                        }*/
                        message.setAttribute('text',msg);
                        //message.setAttribute('fgcolor',"yellow");
                        notificationWindow.messageArea.addText(message.text);
                </method>       
        </class>
        <simplelayout spacing="10" />
        <debuggerWindow name="notificationWindow"/>
        <edittext name="messageEdittext" width="300" />
        <button text="Send message">
                <text name="message" visible="false"/>
                <handler name="onclick">
                        var isim = "cem";
                        var formatMessage = parent.messageEdittext.text;
                        message.setAttribute('text', formatMessage);
                        message.format("%w : %w \n", formatMessage, isim);
                        parent.notificationWindow.addMessage("info", 
message.text);
                        parent.messageEdittext.clearText();
                </handler>
        </button>
</canvas>

-- 
Cem SONMEZ

Reply via email to