Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Put text in image button

    Hi i have a very customized button which will be image. It is an arrow that have text in it and a number imagine the image and in it the following:

    over
    10

    How this can be done? Any ideas?

    #2
    You can use a standard IButton. Use setSrc() for your arrow image. Then setTitle(Over<br>10) where the title is html with two lines of text.

    Comment


      #3
      Hi
      Thank you for the advice.
      I did not give any details. The number will be updated dynamic. Also i try it and it does not show the image.

      Code:
      IButton btn = new IButton();
      		btn.setSrc("/images/arrow.gif");
      		btn.setTitle("Over<br>10");
      Not it is like this but not very correct
      Code:
      	ImgButton imgButton = new ImgButton();
      		imgButton.setSrc("/images/arrow.gif");
      		imgButton.setWidth(75);
      		imgButton.setHeight(59);
      		imgButton.setShowRollOver(false);  
      		imgButton.setShowDown(true);
      		final Label tick = new Label("33.33");
      		tick.setLeft(23);
      		tick.setBottom(70);
      		imgButton.addChild(tick);
      		imgButton.addClickHandler(new ClickHandler() {
      			
      			public void onClick(ClickEvent event) {
      							
      			}
      		});
      I need to add mouse over listner to the label and apply the same mouse over state image(the hand with finger pointing image) to the cursor?
      Last edited by dimitarnn; 21 Oct 2009, 00:59.

      Comment

      Working...
      X