Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Sashform drag does not work due to effect of textsize recalculation
Sashform drag does not work due to effect of textsize recalculation [message #1787643] Wed, 30 May 2018 11:38
Coffee Cup is currently offline Coffee CupFriend
Messages: 2
Registered: November 2017
Junior Member
I've got a Composite a where you can click on an item, that opens another (detail) ScrolledComposite b downside .

Inside b there are textfields.

The problem:
The very first time you click on an item in composite a, and drag the sashform widget (make a resize) the resizing does not work. the position of the sashform drag jumps to a specific different (default?) Position (due to Shell recalculation, see My research:). The next times it does work. When you click on another item in composite a, the same effect appears -> first time it does not work. the second time it does.

My research:
When a resize event is fired (like moving the sashform widget), for every textelement in Composite b a TextSizeStorage.lookupTextSize(...) is run. It checks, if the text (key with size) is in its "cache". if not, the textsize is getting determined and finally put inside the "cache". But there is also the effect that TextSizeRecalculation.execute(); and a forceShellRecalculations( shell ); is run, and this "overrides" the target position of my drag of Sashform.

Result: My sashform drag position is lost in space :) not taken into account.
The next time, making a resize by draging the SashForm Widget, it works - because the textelement with its textsize is already in the "cache", no TextSizeRecalculation etc. is run.

Any hint, how to solve this working also for the first time?

[Updated on: Wed, 30 May 2018 11:43]

Report message to a moderator

Previous Topic:[SOLVED]Cannot launch 64 bit version of Windows application : workbench is invalid -> SWTError
Next Topic:Select "Cross ARM GCC" by SWT script
Goto Forum:

Current Time: Mon May 10 09:04:59 GMT 2021

Powered by FUDForum. Page generated in 0.01868 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top