Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8483737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:11:16+00:00 2026-06-10T20:11:16+00:00

My Class extends gxt button and I would like to add a checkBox in

  • 0

My Class extends gxt button and I would like to add a checkBox in the button
but there is no method for the addition of a component in button.

import com.extjs.gxt.ui.client.widget.button.Button;
import com.extjs.gxt.ui.client.widget.form.CheckBox;

public class ButtonCheckBox extends Button {

    private CheckBox checkBox;

    public ButtonCheckBox() {
        checkBox = new CheckBox();
        checkBox.setBoxLabel("CheckBox");

        setWidth(200);
    }
}

How can I, if possible, add a chckbox in my button?

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T20:11:18+00:00Added an answer on June 10, 2026 at 8:11 pm

    It doesn’t seem to be possible using the GXT 2.x standard API, but may be achieved using an HTML Template.

    Assuming the purpose of the checkbox is to serve as an indicator for the button state, i suggest you use a ToggleButton instead and modify its appearance. You can assign a CSS classname to it and apply differing background images according to its varying states:

    .my-toggle-button .x-btn-mc {
        background-image: url('images/toggle-button/checkbox-off.png');
    }
    
    .my-toggle-button.x-btn-pressed .x-btn-mc {
        background-image: url('images/toggle-button/checkbox-on.png');
    }
    

    References (on the GXT 2.2.5 API)

    • Template
    • ToggleButton
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

my class extends Activity, not ListActivity. i have this code on create method but
I have a class extends NamedParameterJdbcDaoSupport. well this superclass has a final setDataSource method
I've tried to mark multiple locations on my mapview. There is, a class extends
There was -keep class com.actionbarsherlock.** { *; } in my proguard config. As proposesd
I am developing a custom component using JSF 1.2. My tag class extends UIComponentELTag
My class extends DefaultHandler. It overrided 3 methods startDocument, EndDocument, EndElement successfully, but when
there seem to be no stage.border property in AS 3? my class extends Sprite,
This class extends Thread and once it is created, the thread is started. This
My class extends View and I need to get continuous touch events on it.
i have a class extends asynctask private class taskMK extends AsyncTask<Void,Void,JSONObject>{ String url; JSONObject

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.