Hello All
I created several programs using @uidialog - but always with only one drop down list (works wonderfully)
I know how to include a 2nd (3rd, 4th, etc) drop down lists within the same dialog bux - but I do not know how to instruct the program to choose from among them (their contents are mutually exclusive) - as of now, ony the choices from the 1st drop down list are executed.
how can I fix this issue?
many thanks in advance
Wes
using @uidialog
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13583
- Joined: Tue Sep 16, 2008 5:38 pm
Re: using @uidialog
I don't understand your question.
Re: using @uidialog
Hi Gareth.
a picture will help do the trick (pls. find the attached)
I've created a dialog box with 2 drop down list - however the 2nd list is never "active" - even when i chose an object from that list and then press "ok" what ever object is selected in the 1st list is the one that runs.
how do i instruct Eviews to differentiate between these lists?
i've attached my progam - perhapse it'll help you see my problem a little more clearly.
Wes
a picture will help do the trick (pls. find the attached)
I've created a dialog box with 2 drop down list - however the 2nd list is never "active" - even when i chose an object from that list and then press "ok" what ever object is selected in the 1st list is the one that runs.
how do i instruct Eviews to differentiate between these lists?
i've attached my progam - perhapse it'll help you see my problem a little more clearly.
Code: Select all
for !i=0 to 16 step 1
!tables = !i+1
!charts = !i+1
%tables = " ""Performance Table"" ""Global Dividend Yield "" ""Global Price-to-Book"" ""Global P/E"" ""Global Return on Equity"" ""DM Sector Dividend Yield"" ""DM Sector Market Cap"" ""DM Sector Price-to-Book"" ""DM Sector Price-to-Cash"" ""DM Sector P/E"" ""DM Sector Return on Equity"" ""EM Sector Dividend Yield"" ""EM Sector Market Cap"" ""EM Sector Price-to-Book"" ""EM Sector Price-to-Cash"" ""EM Sector P/E"" ""EM Sector Return on Equity"" "
%charts = " ""Equity Valuation (Country)"" "
%tablecode = "market_performance mrb_dy_table mrb_pb_table mrb_pe_table mrb_roe_table dm_sector_dy dm_sector_mc dm_sector_pb dm_sector_pc dm_sector_pe dm_sector_roe em_sector_dy em_sector_mc em_sector_pb em_sector_pc em_sector_pe em_sector_roe "
%chartcode = "chart_01"
!result = @uidialog("caption", "MRB Tables", _
"list",!tables, "Choose a Table", %tables, _
"list",!charts, "Choose a Chart-Pack", %charts)
if !result = -1 then
stop
else if !tables = 1 then
%code = @word(%tablecode, !tables)
run X:\MRB_Addins\Tables\{%code}
stop
else if !tables < 6 then
%code = @word(%tablecode, !tables)
run X:\MRB_Addins\Tables\Global\{%code}
stop
else if !tables > 5 and !tables < 16 then
%code = @word(%tablecode, !tables)
run X:\MRB_Addins\Tables\Sector\{%code}
stop
else if !charts = 1 then
%code = @word(%chartcode, !charts)
run X:\MRB_Addins\Charts\{%code}
endif
endif
endif
endif
endif
next- Attachments
-
- prtscn.png (34.48 KiB) Viewed 10192 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13583
- Joined: Tue Sep 16, 2008 5:38 pm
Re: using @uidialog
Nope, still don't follow. I don't understand what:
Try the following program:
You'll notice that the second list works fine (i.e. your choice in the second list is stored in the string "fruit")
means.I've created a dialog box with 2 drop down list - however the 2nd list is never "active" - even when i chose an object from that list and then press "ok" what ever object is selected in the 1st list is the one that runs.
Try the following program:
Code: Select all
create u 10
%list1 = "red yellow green blue"
%list2 = "banana apple orange grape"
!c1 = 1
!c2 = 1
!result = @uidialog("list", !c1, "colour", %list1, "list", !c2, "fruit", %list2)
if !result = -1 then
stop
else
string colour = @word(%list1, !c1)
string fruit = @word(%list2, !c2)
endif
Re: using @uidialog
Gareth - thank you for your replies - and I appologize for taking up your time with this.
your program is helpful and actually gets me half way to where i want to go - however, what i would like to do is have only one selection at a time be executed (not both, as is the case now)
i.e. when i run your program, and say i select banana from the fruit list - your program not only created a string with the word banana in it but also creats a series with whatever color is set in the color list.
i would like to avoid that very situation
as you can see in my program i have 2 lists as well (each list contains a list of programs that run when selected) - if i chose something from charts list, for example, i don't want anything else to be exectuted except that selection.
thanks you again for all your help
Wes
your program is helpful and actually gets me half way to where i want to go - however, what i would like to do is have only one selection at a time be executed (not both, as is the case now)
i.e. when i run your program, and say i select banana from the fruit list - your program not only created a string with the word banana in it but also creats a series with whatever color is set in the color list.
i would like to avoid that very situation
as you can see in my program i have 2 lists as well (each list contains a list of programs that run when selected) - if i chose something from charts list, for example, i don't want anything else to be exectuted except that selection.
thanks you again for all your help
Wes
- Attachments
-
- prtscn.png (34.48 KiB) Viewed 10187 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13583
- Joined: Tue Sep 16, 2008 5:38 pm
Re: using @uidialog
The lists will always return whatever choice is selected. You can, of course, ignore whatever choice is made though. That's up to the rest of the program though, not the @uidialog bit.
Re: using @uidialog
Ok thank you for the info Gareth ~ I appreciate you're quick correspondence on this issue.
W
W
Who is online
Users browsing this forum: No registered users and 2 guests
