Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
104 user(s) are online (96 user(s) are browsing Forums)

Members: 0
Guests: 104

more...

Support us!

Headlines

 
  Register To Post  

Gadtools example with resizable listview.
Just can't stay away
Just can't stay away


See User information
I want to get rid of a problem in my project using gadtools. It has appeared with AOS4:
Resizing a window with a listview gives a annoying flashing of the listview content.

To better identify the problem i am looking after working programs using Gadtools having such windows and listview, preferrably with source and simple.

Almost all OS2.04 programs did use gadtools , i guess some of them can be foudn that are simple and with source.

Go to top
Re: Gadtools example with resizable listview.
Just can't stay away
Just can't stay away


See User information
OK i found http://thomas-rapp.homepage.t-online.de/examples/lv.c

and can start from there.

Go to top
Re: Gadtools example with resizable listview.
Not too shy to talk
Not too shy to talk


See User information

This example does not have a sizing gadget. Actually I never put a sizing gadget into a window when working with GadTools. I layout the gadgets and calculate the needed space and then open the window with fixed size.

The problem with GadTools is that existing gadgets cannot be changed after they were created. So in order to change the window size you have do destroy and recreate the entire GUI.

To reduce flickering when resizing the window one could remove all gadgets from it on a IDCMP_SIZEVERIFY message.

Why don't you convert your programs from GadTools to ReAction? ReAction does all layouting automatically. That's much easier to program.

Go to top
Re: Gadtools example with resizable listview.
Home away from home
Home away from home


See User information
And Reaction looks better because it scaled to the font so you can see the text.

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: Gadtools example with resizable listview.
Home away from home
Home away from home


See User information
The problem with flickering is likely due to the larger numbers of IDCMP_NEWSIZE messages an app will get under OS4.x combined with the abilty to resie the window and contents continuosly.

To cope with this in a couple of apps I've had to update I set a flag when an IDCMP_NEWSIZE occurs then deal with it after the current batch of IDCMP messages has been processed.

eg (in psudo code)
while(Wait(flags)

   while(
msg nextmsg)
    {
        if 
IDCMP_NEWSIZE needs_resize TRUE;

        
/* handle other stuff */
    
}

    if(
needsresize)
    {
        
doresize
        needs_resize 
FALSE
    
}

}


I've used this approach to fix the non reaction main window of AWeb, dme and a few other small things "ported" from 3.x.


As Thomas says, it might be worth "upgrading" to a reactionGUI which will handle all the resizing etc for you





Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project