Suneido

Integrated Application Platform

  • Home
  • Learning
    • Suneido Manual
    • Beginners
      • Inside Suneido
      • The Suneido Programming Language
      • The Suneido Database
      • Installing Suneido
      • Building Suneido
      • IDE Go To Tour
      • Upgrading To A New Release
    • Advanced
      • Canvas Control
      • DrawControl Part 1
      • DrawControl Part 2
      • DrawControl Part 3
      • SAX Like XML Processing
      • A Plug-In Architecture
      • A Simple Wizard Framework
      • An HTML Include Facility
      • An RSS 2 Feed Creator
      • MIME Generation
      • A New Add-on Facility
      • Workspace Improvement Hack
    • Mockito for Suneido
    • The Suneido Task Scheduler
    • Contributing To Suneido
    • Contributor Assignment of Copyright
    • Language Translation
    • Future Directions
    • Interview With Andrew Mckinlay
  • Forum
    • Announcements
    • Internals & Enhancements
    • Cookbook
    • General
  • FAQ
  • Screenshots
  • Downloads
  • Links

Re: Re: Display issues with adding/removing from VertConrol

Integrated Application Platform › Forums › General › Display issues with adding/removing from VertConrol › Re: Re: Display issues with adding/removing from VertConrol

April 17, 2011 at 7:12 pm #835
amckinlay
Keymaster

That makes sense.

When it creates the control (via Hwnd.CreateWindow) it does not know the final size or position – this is determined by the layout Recalc

So it creates it at an arbitrary position and size and then the first Resize adjusts the position and size.

This works fine when you are constructing the whole window at once because you only see the final result. But not so good with dynamically creating controls.

I’m still not sure why it’s actually getting painted with the original (wrong) position/size. I thought painting wasn’t done till you returned to the message loop and processed paint messages. Unless you call UpdateWindow, but I do not think it is getting called.

Maybe what we should be doing is creating the controls without WS.VISIBLE and then making them visible after the first Resize (SetWindowPos)

I made this simple test:

Window(Controller
{
Xmin: 800
Ymin: 600
Controls: (Vert (Button Add))
On_Add()
{ .Vert.Insert(.Vert.Tally(), #(Field)) }
})

It flickers. If I add this in Hwnd.CreateWindow just before CreateWindowEx

.show = (style & WS.VISIBLE) is WS.VISIBLE
style &= ~WS.VISIBLE

and add this in Hwnd.Resize just before SetWindowPos

if .show
{
.SetVisible(true)
.show = false
}

Now my simple test does not flicker 🙂 But RepeatControl still flickers 🙁 Maybe something to do with it using WndPaneControl ?

WARNING: Be careful modifying Hwnd or similar code. For example, if you make a syntax error you can crash the Suneido UI. I usually Dump() just before making these kinds of changes. Then if you crash you can restore with suneido -load

Search Forums

Log In
Welcome to the new Suneido Web Site and Forum.
Register
Lost Password
users of the previous PHPBB Forum should be able to log in with their previous username and password.

Recent Topics

  • Alpha copy of gSuneido to play with
  • how to start jsuneido ?
  • Problem Starting Suneido…
  • Dialog not showing buttons
  • New link for Suneidojo

Contact Us | Legal Statement | Privacy Statement | SiteMap

Copyright © 2022 Axon® Development Corporation. All Rights Reserved. - Open Source Integrated Database and Programming Language