Hi Alex,
I can even more than controlling a position using this snippet. :) Thanks!
Siarhei
On Mon, Aug 11, 2008 at 4:10 PM, Alexander Back <[EMAIL PROTECTED]> wrote:
> Hi Siarhei,
>
> Siarhei Barysiuk wrote:
>> Hello,
>>
>> I have a TextArea component and want to use background image for it.
>> There are 2 properties in Widget class: backgroundImage and
>> backgroundRepeat.
>> Are there any ways to control position of background image? Like
>> background-position css property equivalent.
> You cannot set the background-position property directly, but you can
> use the "qx.bom.element.Style" class to achieve it.
>
> --snip--
> var myTextArea = new qx.ui.form.TextArea;
> myTextArea.setBackgroundImage("source/to/my/backgroundImage");
>
> this.add(myTextArea);
>
> myTextArea.addEventListener("appear", function(e){
> qx.bom.element.Style.set(this.getElement(), "backgroundPosition",
> "20px");
> });
> --snip--
> You need to set the backgroundPosition within the "appear" listener to
> be sure that the element is already in the DOM.
>
> Hope this helps,
> Alex
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel