What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » SetControlText on a child window

SetControlText on a child window
Author: Message:
MeEtc
Patchou's look-alike
*****

Avatar
In the Shadow Gallery once again

Posts: 2200
Reputation: 60
38 / Male / Flag
Joined: Nov 2004
Status: Away
O.P. SetControlText on a child window
I am having a hard time trying to get these child windows working with YASS. After some pain, i finally have the radio buttons working to change the page just fine, but I am unable to load the initial values into the text boxes. Can anyone provide some insight?

The trace command at the bottom does print the correct value in the debug window, so the data is there.

code:
function loadImgEditor(data, iid){
    var wnd = MsgPlus.CreateWnd('yass_gui_imgedit.xml', 'WndImageEdit', 1);
   
    wnd.Button_SetCheckState('RadGeneral', true);
    cwnd_General = MsgPlus.CreateChildWnd(wnd, 'yass_gui_imgedit.xml', 'WndimageEdit.General', 130, 60, true);
    cwnd_Background = MsgPlus.CreateChildWnd(wnd, 'yass_gui_imgedit.xml', 'WndimageEdit.Background', 130, 60, false);
    cwnd_DP = MsgPlus.CreateChildWnd(wnd, 'yass_gui_imgedit.xml', 'WndimageEdit.DP', 130, 60, false);
    cwnd_StatusImg = MsgPlus.CreateChildWnd(wnd, 'yass_gui_imgedit.xml', 'WndimageEdit.StatusImg', 130, 60, false);
    cwnd_StatusText = MsgPlus.CreateChildWnd(wnd, 'yass_gui_imgedit.xml', 'WndimageEdit.StatusText', 130, 60, false);
    cwnd_Nick = MsgPlus.CreateChildWnd(wnd, 'yass_gui_imgedit.xml', 'WndimageEdit.Nick', 130, 60, false);
    cwnd_PSM = MsgPlus.CreateChildWnd(wnd, 'yass_gui_imgedit.xml', 'WndimageEdit.PSM', 130, 60, false);
    cwnd_Time = MsgPlus.CreateChildWnd(wnd, 'yass_gui_imgedit.xml', 'WndimageEdit.Time', 130, 60, false);
   
    activechild = cwnd_General;
    loadwnd.close(0);
    wnd.Visible = true;
    cwnd_General.SetControlText('lblGenName', data[0]);
    Debug.Trace(data[0]);
}
[Image: signature/]     [Image: sharing.png]
I cannot hear you. There is a banana in my ear.
11-12-2007 06:19 PM
Profile PM Web Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: SetControlText on a child window
Hmm, that's strange. Are you sure that "lblGenName" is a control in "WndimageEdit.General"?
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
11-12-2007 06:24 PM
Profile E-Mail PM Web Find Quote Report
MeEtc
Patchou's look-alike
*****

Avatar
In the Shadow Gallery once again

Posts: 2200
Reputation: 60
38 / Male / Flag
Joined: Nov 2004
Status: Away
O.P. RE: SetControlText on a child window
Positive. I even tried using wnd (var for the parent window) too, and it doesn't work.

Here's the code for WndImageEdit.General
code:
    <Window Id="WndImageEdit.General" Version="1">
        <Position Width="200" Height="180" />
        <ChildTmpl/>
        <Controls>
            <Control xsi:type="StaticControl" Id="lblGenName">
                <Position Width="40" Top="0" Left="0" />
                <Font><Bold>true</Bold></Font>
                <Caption>Name:</Caption>
            </Control>
            <Control xsi:type="EditControl" Id="txtGenName">
                <Position Width="60" Top="0" Left="80" />
            </Control>
            <Control xsi:type="StaticControl" Id="txtGenNameDesc">
                <Position Width="180" Top="15" Left="5" Height="25" />
                <Attributes><WrapText>true</WrapText></Attributes>
                <Caption>Specify a name for your image. Only used as an ID by you within the script itself.</Caption>
            </Control>
        </Controls>
    </Window>
[Image: signature/]     [Image: sharing.png]
I cannot hear you. There is a banana in my ear.
11-12-2007 06:37 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On