@@ -58,10 +58,11 @@ qx.Class.define("qxl.demobrowser.demo.virtual.SelectBox",
58
58
incrementalSearch . setPadding ( 20 ) ;
59
59
incrementalSearch . add ( this . createBox8 ( ) ) ;
60
60
incrementalSearch . add ( this . createBox9 ( ) ) ;
61
+ incrementalSearch . add ( this . createBox10 ( ) ) ;
61
62
62
63
container . add ( standard , { left : 20 , top : 20 } ) ;
63
64
container . add ( advanced , { left : 20 , top : 200 } ) ;
64
- container . add ( incrementalSearch , { left : 20 , top : 380 } ) ;
65
+ container . add ( incrementalSearch , { left : 20 , top : 380 } ) ;
65
66
this . getRoot ( ) . add ( scroller , { edge : 0 } ) ;
66
67
} ,
67
68
@@ -286,7 +287,7 @@ qx.Class.define("qxl.demobrowser.demo.virtual.SelectBox",
286
287
createBox8 : function ( )
287
288
{
288
289
var container = new qx . ui . container . Composite ( new qx . ui . layout . VBox ( 2 ) ) ;
289
- container . add ( new qx . ui . basic . Label ( "Incremental Search" ) ) ;
290
+ container . add ( new qx . ui . basic . Label ( "Incremental Search, plain highlighting " ) ) ;
290
291
291
292
// Creates the model data
292
293
var rawData = [
@@ -296,8 +297,10 @@ qx.Class.define("qxl.demobrowser.demo.virtual.SelectBox",
296
297
var model = qx . data . marshal . Json . createModel ( rawData ) ;
297
298
298
299
// Creates the select box
299
- var selectBox = new qx . ui . form . VirtualSelectBox ( model ) ;
300
- selectBox . setIncrementalSearch ( true ) ;
300
+ var selectBox = new qx . ui . form . VirtualSelectBox ( model ) . set ( {
301
+ incrementalSearch : true ,
302
+ highlightMode : 'plain'
303
+ } ;
301
304
container . add ( selectBox ) ;
302
305
303
306
return container ;
@@ -307,7 +310,7 @@ qx.Class.define("qxl.demobrowser.demo.virtual.SelectBox",
307
310
createBox9 : function ( )
308
311
{
309
312
var container = new qx . ui . container . Composite ( new qx . ui . layout . VBox ( 2 ) ) ;
310
- container . add ( new qx . ui . basic . Label ( "Incremental Search, rich labels " ) ) ;
313
+ container . add ( new qx . ui . basic . Label ( "Incremental Search, html highlighting " ) ) ;
311
314
312
315
// Creates the model data
313
316
var rawData = [
@@ -317,10 +320,32 @@ qx.Class.define("qxl.demobrowser.demo.virtual.SelectBox",
317
320
var model = qx . data . marshal . Json . createModel ( rawData ) ;
318
321
319
322
// Creates the select box
320
- var selectBox = new qx . ui . form . VirtualSelectBox ( model ) ;
321
- selectBox . setIncrementalSearch ( true ) ;
322
- // Set labels and highlighting rich (HTML formatting)
323
- if ( selectBox . setRich ) selectBox . setRich ( true ) ;
323
+ var selectBox = new qx . ui . form . VirtualSelectBox ( model ) . set ( {
324
+ incrementalSearch : true ,
325
+ highlightMode : 'html'
326
+ } ;
327
+ container . add ( selectBox ) ;
328
+
329
+ return container ;
330
+ } ,
331
+
332
+ createBox10 : function ( )
333
+ {
334
+ var container = new qx . ui . container . Composite ( new qx . ui . layout . VBox ( 2 ) ) ;
335
+ container . add ( new qx . ui . basic . Label ( "Incremental Search, no highlighting" ) ) ;
336
+
337
+ // Creates the model data
338
+ var rawData = [
339
+ 'Elm street' , 'Abbey road' , 'Route 61' , 'Central station' , 'Central Park' ,
340
+ 'Park Avenue' , 'Broadway' , 'Hohle Gasse' , 'Überlandstrasse'
341
+ ] ;
342
+ var model = qx . data . marshal . Json . createModel ( rawData ) ;
343
+
344
+ // Creates the select box
345
+ var selectBox = new qx . ui . form . VirtualSelectBox ( model ) . set ( {
346
+ incrementalSearch : true ,
347
+ highlightMode : 'none'
348
+ } ;
324
349
container . add ( selectBox ) ;
325
350
326
351
return container ;
0 commit comments