[Help!] List Boxes |
Author: |
Message: |
rob_botch
Full Member
Posts: 180 Reputation: 4
34 / /
Joined: Apr 2006
|
O.P. [Help!] List Boxes
I am trying to make a script which relies on calling a function when the selection in a list box is changed. The code I have so far used for the function is as follows:
function OnWndTestEvent_LstBoxSelChanged(PlusWnd,ControlId)
{
if(ControlId == LstSender)
{
Wnd.SetControlText("TxtMessage", Wnd.LstBox_GetItemText("LstMessage", Wnd.GetCurSel("LstSender")));
}
}
However, when the selection is changed by clicking, the function is not called. A function for the same window being destroyed does call.
Does anyone know why this may be happening?
Thank you!
|
|
06-28-2006 09:16 AM |
|
|
Eljay
Elite Member
:O
Posts: 2949 Reputation: 77
– / / –
Joined: May 2004
|
RE: [Help!] List Boxes
quote: Originally posted by rob_botch
if(ControlId == LstSender)
should be:
if(ControlId == 'LstSender')
|
|
06-28-2006 09:32 AM |
|
|
rob_botch
Full Member
Posts: 180 Reputation: 4
34 / /
Joined: Apr 2006
|
O.P. RE: [Help!] List Boxes
Thank you, this would have also have caused a problem, but the function was not even being called (it wasn't displayed in the Script Debugger, when all other functions were).
Any ideas?
|
|
06-28-2006 09:35 AM |
|
|
Eljay
Elite Member
:O
Posts: 2949 Reputation: 77
– / / –
Joined: May 2004
|
RE: [Help!] List Boxes
the window is definitely called WndTest?
|
|
06-28-2006 09:39 AM |
|
|
rob_botch
Full Member
Posts: 180 Reputation: 4
34 / /
Joined: Apr 2006
|
O.P. RE: [Help!] List Boxes
Yes, the function:
code: function OnWndTestEvent_Destroyed(PlusWnd,ExitCode)
{
Open = "False";
}
calls as it should.
|
|
06-28-2006 09:45 AM |
|
|
Eljay
Elite Member
:O
Posts: 2949 Reputation: 77
– / / –
Joined: May 2004
|
RE: [Help!] List Boxes
meh looking closer there are a few problems, try this:
code: function OnWndTestEvent_LstBoxSelChanged(PlusWnd,ControlId)
{
if(ControlId == "LstSender")
{
PlusWnd.SetControlText("TxtMessage", PlusWnd.LstBox_GetItemText("LstMessage", PlusWnd.LstBox_GetCurSel("LstSender")));
}
}
|
|
06-28-2006 09:53 AM |
|
|
rob_botch
Full Member
Posts: 180 Reputation: 4
34 / /
Joined: Apr 2006
|
O.P. RE: [Help!] List Boxes
No, that doesn't work either. Is there anything else that I have missed? Thank you,
This post was edited on 06-28-2006 at 10:16 AM by rob_botch.
|
|
06-28-2006 10:15 AM |
|
|
Mnjul
forum super mod
plz wub me
Posts: 5396 Reputation: 58
– / /
Joined: Nov 2002
Status: Away
|
RE: [Help!] List Boxes
I confirm that Plus! does not handle events of Listboxes at all. OnWindowIdEvent_CtrlClicked, OnWindowIdEvent_LstBoxDblClicked, OnWindowIdEvent_LstBoxSelChanged do not work at all for listboxes. This is quite possibly a Plus! bug.
Download my test script and see for yourself.
Attachment: MnjulTestScript.plsc (1.44 KB)
This file has been downloaded 133 time(s).
This post was edited on 06-28-2006 at 04:41 PM by Mnjul.
|
|
06-28-2006 04:38 PM |
|
|
rob_botch
Full Member
Posts: 180 Reputation: 4
34 / /
Joined: Apr 2006
|
O.P. RE: [Help!] List Boxes
Thanks. The test program doesn't work. I think it must be a bug. At least I'm not the only one with this problem!
|
|
06-29-2006 08:56 AM |
|
|
matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
Joined: Dec 2002
Status: Away
|
RE: [Help!] List Boxes
As I posted in the Beta forum I suggest using a ListView until this is fixed. You can use the Report Style list view.
|
|
06-29-2006 01:18 PM |
|
|
Pages: (2):
« First
[ 1 ]
2
»
Last »
|
|