Skip to content

Commit 77e5ff3

Browse files
committed
Add none-rich example
1 parent fb8cfbc commit 77e5ff3

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

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

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ 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());
61+
5962
container.add(standard, {left : 20, top : 20});
6063
container.add(advanced, {left : 20, top : 200});
6164
this.getRoot().add(scroller, {edge : 0});
@@ -277,5 +280,47 @@ qx.Class.define("qxl.demobrowser.demo.virtual.SelectBox",
277280

278281
return container;
279282
}
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+
}
280325
}
281326
});

0 commit comments

Comments
 (0)