BookmarkSubscribeRSS Feed
rdr031
Calcite | Level 5

I am creating a GUI.

 

i created a list box with multiple selections. Now i need to clear it using a push button. Can anyone help me to do that ?

4 REPLIES 4
rdr031
Calcite | Level 5

THis is my Work so far

 

pushbutton2:                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                
if Listbox2.SELECTEDITEMS ne ' '                                                                                                                                                                                                                                
then                                                                                                                                                                                                                                                            
do;                                                                                                                                                                                                                                                             
submit continue;                                                                                                                                                                                                                                                
Listbox2.SELECTEDITEMS ='';                                                                                                                                                                                                                                     
endsubmit;                                                                                                                                                                                                                                                      
end;                                                                                                                                                                                                                                                            
return;                  

But it is not working
SASKiwi
PROC Star

Well its been a very long time since I used SAS/AF and I can't test this for you but I would try something like this. You need to use SCL statements to clear the selections, not a SUBMIT block. 

 

pushbutton2:                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                
if Listbox2.SELECTEDITEMS ne ' '                                                                                                                                                                                                                                
then                                                                                                                                                                                                                                                            
do;                                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                             
Listbox2.SELECTEDITEMS ='';                                                                                                                                                                                                                                     
refresh;
                                                                                                                                                                                                                                                     
end;                                                                                                                                                                                                                                                            
return;                  

 

rdr031
Calcite | Level 5

Thank you for the reply.

But still it is not working

SASKiwi
PROC Star

Perhaps start by testing your pushbutton like so. A message should show in the message line when the button is pressed.

 

pushbutton2:                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                
_msg_ = 'Button Pressed'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
return; 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 880 views
  • 0 likes
  • 2 in conversation