Skip to content

Commit 7b60275

Browse files
committed
Adapt to latest VirtualSelectBox
1 parent 77e5ff3 commit 7b60275

File tree

1 file changed

+37
-10
lines changed

1 file changed

+37
-10
lines changed

source/class/qxl/demobrowser/demo/virtual/SelectBox.js

Lines changed: 37 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,14 @@ qx.Class.define("qxl.demobrowser.demo.virtual.SelectBox",
5656
advanced.add(this.createBox6());
5757
advanced.add(this.createBox7());
5858

59-
advanced.add(this.createBox8());
60-
advanced.add(this.createBox9());
59+
search.add(this.createBox8());
60+
search.add(this.createBox9());
61+
search.add(this.createBox10());
6162

6263
container.add(standard, {left : 20, top : 20});
6364
container.add(advanced, {left : 20, top : 200});
65+
container.add(search, {left : 20, top : 380});
66+
6467
this.getRoot().add(scroller, {edge : 0});
6568
},
6669

@@ -281,10 +284,10 @@ qx.Class.define("qxl.demobrowser.demo.virtual.SelectBox",
281284
return container;
282285
}
283286

284-
createBox9 : function()
287+
createBox8 : function()
285288
{
286289
var container = new qx.ui.container.Composite(new qx.ui.layout.VBox(2));
287-
container.add(new qx.ui.basic.Label("Incremental Search"));
290+
container.add(new qx.ui.basic.Label("Incremental Search, plain highlighting"));
288291

289292
// Creates the model data
290293
var rawData = [
@@ -294,8 +297,10 @@ qx.Class.define("qxl.demobrowser.demo.virtual.SelectBox",
294297
var model = qx.data.marshal.Json.createModel(rawData);
295298

296299
// Creates the select box
297-
var selectBox = new qx.ui.form.VirtualSelectBox(model);
298-
selectBox.setIncrementalSearch(true);
300+
var selectBox = new qx.ui.form.VirtualSelectBox(model).set({
301+
incrementalSearch : true,
302+
highlightMode : 'plain'
303+
};
299304
container.add(selectBox);
300305

301306
return container;
@@ -314,10 +319,32 @@ qx.Class.define("qxl.demobrowser.demo.virtual.SelectBox",
314319
var model = qx.data.marshal.Json.createModel(rawData);
315320

316321
// 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);
322+
var selectBox = new qx.ui.form.VirtualSelectBox(model).set({
323+
incrementalSearch : true,
324+
highlightMode : 'plain'
325+
};
326+
container.add(selectBox);
327+
328+
return container;
329+
},
330+
331+
createBox10 : function()
332+
{
333+
var container = new qx.ui.container.Composite(new qx.ui.layout.VBox(2));
334+
container.add(new qx.ui.basic.Label("Incremental Search, no highlighting"));
335+
336+
// Creates the model data
337+
var rawData = [
338+
'Elm street', 'Abbey road', 'Route 61', 'Central station', 'Central Park',
339+
'Park Avenue', 'Broadway', 'Hohle Gasse', 'Überlandstrasse'
340+
];
341+
var model = qx.data.marshal.Json.createModel(rawData);
342+
343+
// Creates the select box
344+
var selectBox = new qx.ui.form.VirtualSelectBox(model).set({
345+
incrementalSearch : true,
346+
highlightMode : 'none'
347+
};
321348
container.add(selectBox);
322349

323350
return container;

0 commit comments

Comments
 (0)