Skip to content

How to modify the width or height of TableItem in pixels #1538

@pcdlrzxx

Description

@pcdlrzxx

I can simply modify the width and height of TableItem through the code below

table.addListener(SWT.MeasureItem, new Listener() {
   public void handleEvent(Event event) {
      event.width = 100;
      event.height = 20;
   }
});

but it only works in points, and I just want to know how to make it work in pixels.

As for Table, although it also can't do this by "Public" method, but can be achieved by using reflection.
However the "Event" class doesn't provide similar methods.

Can anyone help me ,thanks very much!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions