Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include once "IUP/iup.bi"
  2. #include once "IUP/iupcontrols.bi"
  3.  
  4. #define NULL 0
  5.  
  6. function create_mat() as Ihandle ptr
  7.     dim as  Ihandle ptr mat = IupMatrix(NULL)
  8.  
  9.     IupSetAttribute(mat,"NUMCOL","20")
  10.     IupSetAttribute(mat,"NUMLIN","30")
  11.  
  12.     IupSetAttribute(mat,"NUMCOL_VISIBLE","2")
  13.     IupSetAttribute(mat,"NUMLIN_VISIBLE","3")
  14.  
  15.     IupSetAttribute(mat,"0:0","Inflation")
  16.     IupSetAttribute(mat,"1:0","Medicine")
  17.     IupSetAttribute(mat,"2:0","Food")
  18.     IupSetAttribute(mat,"3:0","Energy")
  19.     IupSetAttribute(mat,"0:1","January 2000")
  20.     IupSetAttribute(mat,"0:2","February 2000")
  21.     IupSetAttribute(mat,"1:1","5.6")
  22.     IupSetAttribute(mat,"2:1","2.2")
  23.     IupSetAttribute(mat,"3:1","7.2")
  24.     IupSetAttribute(mat,"1:2","4.5")
  25.     IupSetAttribute(mat,"2:2","8.1")
  26.     IupSetAttribute(mat,"3:2","3.4")
  27.  
  28.     IupSetAttribute(mat,"RESIZEMATRIX","YES")
  29.     IupSetAttribute(mat,"MARKMODE","CELL")
  30.     IupSetAttribute(mat,"MARKMODE","LINCOL")
  31.     IupSetAttribute(mat,"MULTIPLE","YES")
  32.     IupSetAttribute(mat,"AREA","NOT_CONTINUOUS")
  33.  
  34.     return mat
  35. end function
  36.  
  37. '/* Main program */
  38.  
  39. dim as Ihandle ptr dlg
  40.  
  41. IupOpen()      
  42. IupControlsOpen ()
  43.  
  44. dlg = IupDialog(create_mat())
  45. IupSetAttribute(dlg, "TITLE", "IupMatrix")
  46.  
  47. IupShow (dlg)
  48. IupMainLoop ()
  49. IupClose ()  
  50.   'return EXIT_SUCCESS;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement