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 7700211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:39:22+00:00 2026-05-31T22:39:22+00:00

Is it possible to display a list of items with a custom item template

  • 0

Is it possible to display a list of items with a custom item template such as one can do in WPF, by specifying a Listbox Itemtemplate? Say i’m looking to display a list of Person instances, each with a name, age and a picture. Each listitem would have eq. a Label for name, age and an image area for the picture.

  • 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-05-31T22:39:23+00:00Added an answer on May 31, 2026 at 10:39 pm

    you can use for this purpose Composite class, or some derivation of this class. Here is how i make it:

    public class UiTransaction {
    
    private String sFirstlabel;
    private String sSecondlabel;
    
    public UiTransaction(String sFirstlabel, String sSecondlabel) {
        this.sFirstlabel = sFirstlabel;
        this.sSecondlabel = sSecondlabel;
    }
    
    public Composite getComposite(Composite composite, int style){
        return new SpecificComposite(composite,style);
    }
    class SpecificComposite extends Composite {
    
        public SpecificComposite(final Composite composite, int style) {
            super(composite, style);
            Label lblFirstlabel = new Label(this, SWT.NONE);
            lblFirstlabel.setBounds(10, 10, 275, 15);
            lblFirstlabel.setText(sFirstlabel);
    
            Label lblSecondlabel = new Label(this, SWT.NONE);
            lblSecondlabel.setBounds(10, 31, 275, 15);
            lblSecondlabel.setText(sSecondlabel);
    
        }
    
    }
    

    }

    After that you can use ScrolledComposite for displaying this custom Composite.

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

Sidebar

Related Questions

I want to display a custom template/item as selected item in ComboBox (this item
Is it possible to store the display list data on the video card memory?
Using a QListView, and QStandardItemModel, is it possible to display icons in the list
Is it possible to display images next to items in FlyoutAnchor submenu? I try
Is it possible to display a view from another controller? Say for example I
Does anyone know if it's possible to display items on a calendar view (on
I’m trying to display a list of shops each with 3 random items from
i got a listbox with items and i use datatemplate to display the items
I want to display a list of 16 of the most popular items in
Possible Duplicate: A Space between Inline-Block List Items I have a JSFiddle demo of

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.