I am trying to get qx.ui.embed.Html with Qooxdoo scrool themed.
I wans to implement it inside vitrual list .
All i want is a qx.ui.embed.Html widget with Custom (qx themed) scroolbars
coz it is so ugly in native scrolls.
Here is my attempt to implement it :
// Create a scroll container
> var scrollContainer = new qx.ui.container.Scroll();
> scrollContainer.set({
> width: 100,
> height: 100
> });
> var h = new qx.ui.embed.Html()
> h.setHtml("this is test to see if qooxdoo scroolbar working with html this
> is test to see if qooxdoo scroolbar working with htmlthis is test to see if
> qooxdoo scroolbar working with htmlthis is test to see if qooxdoo scroolbar
> working with htmlthis is test to see if qooxdoo scroolbar working with
> htmlthis is test to see if qooxdoo scroolbar working with htmlthis is test
> to see if qooxdoo scroolbar working with htmlthis is test to see if qooxdoo
> scroolbar working with html")
> h.set({
> width: 200,
> height: 200
> });
> h.setOverflowY("hidden")
> h.setOverflowX("hidden")
> h.setAllowGrowY(true)
> h.setAllowShrinkY(false)
> h.setAllowGrowX(true)
> scrollContainer.add(h)
> var doc = this.getRoot();
> doc.add(scrollContainer,
> {
> left:10,
> top:10
> });
It works in playground.
But I tried to make it a widget:
(i am not an expert in doing so):
qx.Class.define("phwabe.view.ChatView.PostItem",
> {
> extend : qx.ui.container.Scroll,
> properties :
> {
> /** Any text string which can contain HTML, too */
> html :
> {
> check : "String",
> apply : "_applyHtml",
> event : "changeHtml",
> nullable : true
> }
> },
>
> members :
> {
> construct : function()
> {
> this.base(arguments)
> },
> _createChildControlImpl : function(id)
> {
> var control;
> switch(id)
> {
> //case "icon":
> // control = new qx.ui.basic.Image(this.getIcon());
> // control.setAnonymous(true);
> // this._add(control, {row: 0, column: 0, rowSpan: 2});
> // break;
> case "html":
> control = new qx.ui.embed.Html()
> control.setAllowGrowX(true);
> control.setOverflowY('hidden');
> control.setAllowShrinkY(false)
> this.add(control)
> }
> },
> _applyHtml : function(value, old)
> {
> var post = this.getChildControl("html");
> // Workaround for http://bugzilla.qooxdoo.org/show_bug.cgi?id=7679
> // Insert HTML content
> post.setHtml(value||"");
> }
> }
> })
But that is failing hard with : Error: Exception while creating child
control 'html' of widget phwabe.view.ChatView.PostItem[446-0]: Unsupported
control: pane
I am doing it wrong obviously.
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel