lxn / walk

A Windows GUI toolkit for the Go Programming Language
Other
6.8k stars 885 forks source link

What happened to .Layout().Update(true) ? #650

Open StephanVerbeeck opened 4 years ago

StephanVerbeeck commented 4 years ago

The function to trigger the update/recalculation of the layout of a widget is gone! I had in total 6 locations where I needed to call this function (that has now disappeared). After commenting out these lines my program compiles again but new tabs added to a tabwidget no longer become visible and elsewhere other widget dimensions are wrong.

What happened: 1) should this now be automatic (because it is not working) 2) is there another function that does this or did the function move to another class?

examples

com[2].Parent().Layout().Update(true)

// UpdateLayout call after removing/add/altering widgets
func UpdateLayout() {
    mainWindow.Layout().Update(true)
}
lxn commented 4 years ago

Layout.Update was replaced by Window.RequestLayout when the new concurrent layout system landed: https://github.com/lxn/walk/commit/d8ada91af705b66ffc738f77a8fa3ae110ac2afe

If you have some widgets of your own, you will need to adjust them, like those in walk.

StephanVerbeeck commented 4 years ago

ok Thanks, but I regret to inform you the new function is not working as the old did. I fact I have a long range of new formatting problems that did not exist earlier with even simple things like a dialog box with some simple checkboxes (I will post that in a separate issue with example code and screenshot as #654 ).