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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T08:23:05+00:00 2026-05-11T08:23:05+00:00

I am writing an Eclipse plugin which has a hover control that consists of

  • 0

I am writing an Eclipse plugin which has a hover control that consists of two controls, one on top of another:

An HTML viewer (BrowserInformationControl) for which I Can easily compute the size hint

A TreeViewer that contains a Tree.

I have set up my tree with actual contents. However, I can’t find a way to figure out the size of the tree or the size hint for it once rendered.

  • 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. 2026-05-11T08:23:06+00:00Added an answer on May 11, 2026 at 8:23 am

    According to the API of org.eclipse.swt.widgets.Tree, this should be done with:

    public Point computeSize(int wHint,                      int hHint,                      boolean changed) 

    The preferred size of a control is the size that it would best be displayed at.

    The width hint and height hint arguments allow the caller to ask a control questions such as ‘Given a particular width, how high does the control need to be to show all of the contents?’
    To indicate that the caller does not wish to constrain a particular dimension, the constant SWT.DEFAULT is passed for the hint.

    If the changed flag is true, it indicates that the receiver’s contents have changed, therefore any caches that a layout manager containing the control may have been keeping need to be flushed. When the control is resized, the changed flag will be false, so layout manager caches can be retained.


    Note that on Windows, the behavior of computeSize() was flawed: see this message and this bug: fixed for eclipse 3.4M1 and forward.

    Example of use of computeSize() in this message.

    The use of getBound() might be another interesting alternative.

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

Sidebar

Ask A Question

Stats

  • Questions 117k
  • Answers 118k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer class Program { static void Main(string[] args) { Timer timer… May 11, 2026 at 10:50 pm
  • Editorial Team
    Editorial Team added an answer Use GROUP_CONCAT SELECT GROUP_CONCAT(bar) FROM TABLE GROUP BY foo; May 11, 2026 at 10:50 pm
  • Editorial Team
    Editorial Team added an answer Your code doesn't work because the function is not returning… May 11, 2026 at 10:50 pm

Related Questions

I am writing an Eclipse plugin, and in response to some action I am
I'm building an Eclipse plugin that talks to a REST interface which uses Basic
I am writing Eclipse plugins for Java, and have the following problem: Given an
I am writing an application that uses Equinox as my OSGi framework. I am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.