@@ -56,6 +56,9 @@ qx.Class.define("qxl.demobrowser.demo.virtual.SelectBox",
56
56
advanced . add ( this . createBox6 ( ) ) ;
57
57
advanced . add ( this . createBox7 ( ) ) ;
58
58
59
+ advanced . add ( this . createBox8 ( ) ) ;
60
+ advanced . add ( this . createBox9 ( ) ) ;
61
+
59
62
container . add ( standard , { left : 20 , top : 20 } ) ;
60
63
container . add ( advanced , { left : 20 , top : 200 } ) ;
61
64
this . getRoot ( ) . add ( scroller , { edge : 0 } ) ;
@@ -277,5 +280,47 @@ qx.Class.define("qxl.demobrowser.demo.virtual.SelectBox",
277
280
278
281
return container ;
279
282
}
283
+
284
+ createBox9 : function ( )
285
+ {
286
+ var container = new qx . ui . container . Composite ( new qx . ui . layout . VBox ( 2 ) ) ;
287
+ container . add ( new qx . ui . basic . Label ( "Incremental Search" ) ) ;
288
+
289
+ // Creates the model data
290
+ var rawData = [
291
+ 'Elm street' , 'Abbey road' , 'Route 61' , 'Central station' , 'Central Park' ,
292
+ 'Park Avenue' , 'Broadway' , 'Hohle Gasse' , 'Überlandstrasse'
293
+ ] ;
294
+ var model = qx . data . marshal . Json . createModel ( rawData ) ;
295
+
296
+ // Creates the select box
297
+ var selectBox = new qx . ui . form . VirtualSelectBox ( model ) ;
298
+ selectBox . setIncrementalSearch ( true ) ;
299
+ container . add ( selectBox ) ;
300
+
301
+ return container ;
302
+ } ,
303
+
304
+ createBox9 : function ( )
305
+ {
306
+ var container = new qx . ui . container . Composite ( new qx . ui . layout . VBox ( 2 ) ) ;
307
+ container . add ( new qx . ui . basic . Label ( "Incremental Search, rich highlighting" ) ) ;
308
+
309
+ // Creates the model data
310
+ var rawData = [
311
+ 'Elm street' , 'Abbey road' , 'Route 61' , 'Central station' , 'Central Park' ,
312
+ 'Park Avenue' , 'Broadway' , 'Hohle Gasse' , 'Überlandstrasse'
313
+ ] ;
314
+ var model = qx . data . marshal . Json . createModel ( rawData ) ;
315
+
316
+ // Creates the select box
317
+ var selectBox = new qx . ui . form . VirtualSelectBox ( model ) ;
318
+ selectBox . setIncrementalSearch ( true ) ;
319
+ // Make labels and highlighting rich (HTML formatted)
320
+ selectBox . setRich ( true ) ;
321
+ container . add ( selectBox ) ;
322
+
323
+ return container ;
324
+ }
280
325
}
281
326
} ) ;
0 commit comments