Jump to content

Sakis

Members
  • Content Count

    6
  • Joined

  • Last visited

  1. Sakis

    SVG position

    I found the answer it is one more line of code in your suggested solution W3Button1.handle.style.setProperty('background-position', '10px 12px'); Thank you very much!!!!!!
  2. Sakis

    SVG position

    Thank you for your help! One more question. What if I want to set the image origin say 10px from left and 12px from the top. How can I do that? I have a parametric CAD background where absolute dimensions rule
  3. Sakis

    SVG position

    Sorry I didn't read your post carefully. I just need a button with an image in it.
  4. Sakis

    SVG position

    No it is not. I need to place the image, inside the button, in positions relative to the center and the dimension of the button. Both of them change when the screen resizes and if the shape of the button is not a rectangle the actual center is also different. I thought something like the code below would work but it doesn't W3BitBtn1.InnerHTML:='<img src="res/anchor.svg" "position=fixed" top="1px" left="1px" width="30px" height="30px" >';
  5. Sakis

    SVG position

    1) This is the code for the quarter shape procedure TForm1.InitializeObject; begin inherited; {$I 'Form1:impl'} w3_setstyle(W3BitBtn1.handle,'height','64px'); w3_setstyle(W3BitBtn1.handle,'width','64px'); w3_setstyle(W3BitBtn1.handle,'border-radius','0 0 90px 0'); w3_setstyle(W3BitBtn1.handle,'background','orange'); W3BitBtn1.InnerHTML:='<img src="res/anchor.svg" width="30px" height="30px" >'; end; 2) I couldn't find an example how to use Glyph and thought that using Layout to position an image inside a button is not a good idea.
  6. Sakis

    SVG position

    Hello First of all sorry for my bad English. I have assigned an SVG in a BitButton using W3BitBtn1.InnerHTML:='<img src="res/anchor.svg" width="30px" height="30px" >'; I want to ask how do I change the position of the SVG? My button has a quarter circle shape and I need to position the SVG so it will appear in the center of the quarter circle. Thank you in advance
×