Thanks a lot! it works properly! I see now , its my first attempt
making my own widgets and quite interesting  .

a few problem raised:
http://tinyurl.com/ndfom54
HTML Area will increase in height according to content (due to
overflowY is hidden i think?) . So have to set statically its height ,
so to make it useful for scrollcontainer's scrollbar.

Anyway to increase htmlarea's hieght according to html content inside,
dynamically ?
Should i look into themedIframe source code? Can we replace iframe
with embed.Html there?







On 8/27/14, Derrell Lipman <derrell.lip...@unwireduniverse.com> wrote:
> Phyo, you have a few problems in your widget example. The first is probably
> a typo, since I don't think you'd get the error you presented with it this
> way: construct is a top-level key. It doesn't go inside of members; it's at
> the same level as members.
>
> The cause of the error you're seeing is because your
> _createChildControlImpl method must return the control it creates, or, if
> the id doesn't match anything that you handle directly, you must call the
> superclass method with the given id, and return what that method returns.
>
> Here's a working version of your widget, in the playground.
> http://tinyurl.com/nvy3ezg
>
> Cheers,
>
> Derrell
>
>
>
> On Tue, Aug 26, 2014 at 5:39 PM, Phyo Arkar <phyo.arkarl...@gmail.com>
> wrote:
>
>> 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
>>
>>
>

------------------------------------------------------------------------------
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

Reply via email to