- Timestamp:
- 03/16/07 10:22:26 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_droplist_pm.pro
r157 r226 6 6 ; case uval of 7 7 ; 'done':widget_control, event.top, /destroy 8 ; 'dynamic_resize':BEGIN 8 ; 'dynamic_resize':BEGIN 9 9 ; widget_control, event.id, get_value = value 10 10 ; widget_control, DroplistId, set_value = {dynamic_resize:value} 11 11 ; END 12 ; 'droplist_select':BEGIN 12 ; 'droplist_select':BEGIN 13 13 ; widget_control, event.id, get_value = value 14 14 ; widget_control, DroplistId, set_value = {droplist_select:value} 15 15 ; END 16 ; 'value':BEGIN 16 ; 'value':BEGIN 17 17 ; widget_control, event.id, get_value = value 18 18 ; widget_control, DroplistId, set_value = value 19 19 ; END 20 ; 'get':BEGIN 20 ; 'get':BEGIN 21 21 ; widget_control, DroplistId, get_value = value 22 22 ; help, value, /struct … … 54 54 ; @categories 55 55 ; Compound widget 56 ; 56 ; 57 57 ; @param ID 58 ;59 58 ; 60 59 ; @param VALUE … … 62 61 ; 63 62 ; @returns 64 ; 65 ; 63 ; 66 64 ; @uses 67 ; 68 ; 65 ; 69 66 ; @restrictions 70 ; 71 ; 67 ; 72 68 ; @examples 73 ; 74 ; 69 ; 75 70 ; @history 76 ; 77 ; 78 ; @version 71 ; 72 ; @version 79 73 ; $Id$ 80 74 ;- … … 104 98 ; @categories 105 99 ; Compound widget 106 ; 100 ; 107 101 ; @param ID 108 102 ; 109 103 ; @returns 110 ; 111 ; 104 ; 112 105 ; @uses 113 ; 114 ; 106 ; 115 107 ; @restrictions 116 ; 117 ; 108 ; 118 109 ; @examples 119 ; 120 ; 110 ; 121 111 ; @history 122 ; 123 ; 124 ; @version 112 ; 113 ; @version 125 114 ; $Id$ 126 115 ;- … … 141 130 ; @categories 142 131 ; Compound widget 143 ; 132 ; 144 133 ; @param EVENT 145 134 ; 146 ;147 135 ; @returns 148 ; 149 ; 136 ; 150 137 ; @uses 151 ; 152 ; 138 ; 153 139 ; @restrictions 154 ; 155 ; 140 ; 156 141 ; @examples 157 ; 158 ; 142 ; 159 143 ; @history 160 ; 161 ; 162 ; @version 144 ; 145 ; @version 163 146 ; $Id$ 164 147 ;- … … 200 183 ; @categories 201 184 ; Compound widget 202 ; 185 ; 203 186 ; @param PARENT {in}{required} 204 187 ; The widget ID of the parent widget. … … 207 190 ; Buttons will be arranged in the number of columns 208 191 ; specified by this keyword. 209 ; 192 ; 210 193 ; @keyword ROW 211 194 ; Buttons will be arranged in the number of rows 212 195 ; specified by this keyword. 213 ; 196 ; 214 197 ; @keyword UVALUE 215 198 ; The user value to be associated with the widget. 216 ; 199 ; 217 200 ; @keyword UNAME 218 201 ; The user name to be associated with the widget. 219 ; 202 ; 220 203 ; @keyword _EXTRA 221 204 ; Used to pass your keywords … … 243 226 ; index the array of names originally used to set the widget''s 244 227 ; value 245 ; OUT:It is an integer which can take 3 values: 228 ; OUT:It is an integer which can take 3 values: 246 229 ; 1 : If we press + when the index is already at the max 247 230 ; Comment: In this case, the index stay at the max … … 256 239 ; 1) GET_VALUE 257 240 ; widget_control,wid_id,get_value=resultat 258 ; Send back, in the result variable, a structure of 3 elements whose 241 ; Send back, in the result variable, a structure of 3 elements whose 259 242 ; names are inspired by keywords we can pass at widget_control when 260 243 ; we use WIDGET_COMBOBOX: … … 273 256 ; pour WIDGET_DROPLIST Impose peut etre: 274 257 ; a) The contents of the list widget (string or string array) 275 ; b) A structure which can have for elements (from 1 to 3): 258 ; b) A structure which can have for elements (from 1 to 3): 276 259 ; DYNAMIC_RESIZE:Set this keyword to activate (if set to 1) 277 260 ; or deactivate (if set to 0) dynamic resizing of the … … 308 291 IF (N_PARAMS() NE 1) THEN MESSAGE, 'Incorrect number of arguments' 309 292 ON_ERROR, 2 ;return to caller 310 ; che king for row and column keywords311 row = keyword_set(row)*(1-keyword_set(column)) 312 column = keyword_set(column)*(1-keyword_set(row))+(keyword_set(column) EQ row) 293 ; checking for row and column keywords 294 row = keyword_set(row)*(1-keyword_set(column)) 295 column = keyword_set(column)*(1-keyword_set(row))+(keyword_set(column) EQ row) 313 296 if NOT keyword_set(uvalue) then uvalue = '' 314 297 if NOT keyword_set(uname) then uname = '' … … 318 301 , FUNC_GET_VALUE='cw_droplist_pm_get_value' $ 319 302 , PRO_SET_VALUE='cw_droplist_pm_set_value' $ 320 , UVALUE = uvalue, UNAME = uname, _extra = ex) 303 , UVALUE = uvalue, UNAME = uname, _extra = ex) 321 304 ; 322 305 if keyword_set(row) THEN nothing = widget_button(base,value= '-', uvalue= 'minus')
Note: See TracChangeset
for help on using the changeset viewer.