# Demo with new Dialog Items  in WPS
# ----------------------------------

# For Space: each character needs 1 column -
# e.g. "Choose Car     " = 15 columns
# ----------------------------------


	dlg_init(): #Init new Dialog

	#Label
	dlg_label(1,2,"Label Item only for Info",24); #24= use 24 columns for text

	#Edit Field
	string_copy(s5,"10");
	dlg_editbox(1,3,"Edit 1         ",s5,10);# use blanks for text width

	string_copy(s6,"long answer");
	dlg_editbox(1,4,"Longer Input   ",s6,30);

	# Listbox 1
	dlg_list_set(1,"Listbox 1 Entry 1",1);   # (nr,text,item)
	dlg_list_set(2,"Listbox 1 Entry 2",1);
	dlg_list_set(3,"Listbox 1 Entry 3",1);
	dlg_listbox(1,6,"Choose Entry   ",30,1); # (x,y,text,width,item)

	#Listbox  2
	dlg_list_set(1,"Ford",2);
	dlg_list_set(2,"Porsche",2);
	dlg_list_set(3,"VW",2);
	dlg_listbox(1,7,"Choose Car     ",15,2);

	#ColorPicker
	i30 = 5;
	dlg_colorpick(1,9,"Choose Color   ",i30);

	#CheckBox
	i31 = 1;
	dlg_checkbox(15,10,"Yes or NO",20,i31);
	
	#Button
	dlg_button(15,12,"Button1",10,1,1); # Button Nr 1 (x,y,name,width,high,item)
	dlg_button(25,11,"Button2",10,3,2); # Button Nr 2
	dlg_button(35,11,"Button3",10,2,3); # Button Nr 3

	
	#Icon
	dlg_button(0,0,"wpsdemo",0,0,0);# 0 = Path for Icons /artifex/data/bmp/wpsdemo
	                                #                   -----------------  + string
	dlg_button(15,14,"my_icon",21,4,-4);# Button Nr 4 (less 0 means Icon )
	dlg_label(15,17,"Bitmap above   ",15);

	#Edit Field
	string_copy(s5,"20");
	dlg_editbox(1,18,"Edit 2         ",s5,10);# use blanks for text width

	dlg_label(1,19,"that's it !",14);

    # Start Modal Dialog
	dlg_start("New Item Demo",i5); # 0= OK;  -1=Cancel;  > 0 =Button Number


	if( i5 < 0) then 
    begin
			writeln("Dialog Canceld ");
	end;
    
	if (i5 >= 0) then
	begin
	    dlg_list_get(s7,i1,1);
		dlg_list_get(s8,i10,2);
		newmask("");
		fillmask(1,1,"Edit 1 =", s5);
		fillmask(1,2,"Edit 2 =", s6);
		fillmask(1,3,"Listbox1", s7);
		fillmask(1,4,"Your Car", s8);
		fillmask(1,5,"Color   ",i30);
		fillmask(1,6,"Checkbox",i31);
		if( i5 > 0) then
		begin
		    string_copy(s9,"You pushed Button ->");
			string_cat(s9,i5);
		    maskinfo(1,7,s9)
	    end;
		domask();
	
	end;

END.
