OS, TARGET?WINDOWS 7
looks like Application.ProcessMessages call will not help? btw, how did you made close button for tabs?https://forum.lazarus.freepascal.org/index.php/topic,56274.0.html
looks like Application.ProcessMessages call will not help? btw, how did you made close button for tabs?Did not help Application.ProcessMessages;
looks like Application.ProcessMessages call will not help? btw, how did you made close button for tabs?https://forum.lazarus.freepascal.org/index.php/topic,56274.0.html
if you wave the mouse over the area that needs updating does it appear after that ?No, it does not appear if you click on any element on the form that has an event, then the TreeView is drawn.
if you wave the mouse over the area that needs updating does it appear after that ?Perhaps the problem is that I am passing LoadFileTreeViewPath (Form1.TreeView1);
btw, i hope, you have paired BeginUpdate/EndUpdate for TreeView?I initially tried this method, it did not help.
It would be helpful if you'd extract the critical part into a separate compilable project which you can upload here.Do not forget to specify the path to your folder, otherwise it will load from 'C: \ WINDOWS \ System32 \' Long.
It didn't work that way. The general problem is when loading the form (FormCreate, FormShow). If you execute the code with Button it works fine.if you wave the mouse over the area that needs updating does it appear after that ?Perhaps the problem is that I am passing LoadFileTreeViewPath (Form1.TreeView1);
and populate it in another unit.
PS: Possibly bad translation I hope you understand.
Change the focus via code to another control and back again...
MyOtherControl.SetFocus;
Application.ProcessMessages;
MyTreeview.SetFocus;
It works perfectly fine over here with 2.0.4, 6 etcI don't have these versions any more. With 2.0.8, it does NOT work, but it DOES work with 1.8.4.
It seems there is a lock on the window update if the size of the window is the same as the last time an update to the window was requested.Thanks! I thought about it, how will I get back to the project and check it out.
I am not sure if this is related to the Widget or LCL code but i had to do a hack to force an update to the combo box so that it would fully paint its border.
I have seen code in the TControl I beleve or TWinControl that does check for the current size verses the changed size request coming in and if they are the same the request gets aborted. This may have something to do with it.
In your OnResizeEvent which comes when the form is actually visible do this.The first will be a different size than currently and allow for the control to refresh and the second puts it back to where it was.
TreeView.Width := Treeview.Width-1; TreeView.Width := Treeview.Width+1;
This all happens during a cache update so there is no flicker but you should see your TreeView display as you wish.