Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
44 user(s) are online (28 user(s) are browsing Forums)

Members: 2
Guests: 42

K-L, davec555, more...

Headlines

 
  Register To Post  

Size gadget width
Amigans Defender
Amigans Defender


See User information
How do I find out the size of the size gadget in my window?

Go to top
Re: Size gadget width
Just popping in
Just popping in


See User information
If you need to obtain the sizes before opening the window use this approach:

On AmigaOS4:

struct DrawInfo *dri = GetScreenDrawInfo(screen);
GetGUIAttrs(NULL, dri,
GUIA_SizeGadgetWidth, &width,
GUIA_SizeGadgetHeight, &height,
TAG_DONE);
FreeScreenDrawInfo(screen, dri);

On AmigaOS3:

struct DrawInfo *dri = GetScreenDrawInfo(screen);
struct Image *img;
width = 18; /* default sizing gadget width */
height = 10; /* default sizing gadget height */
if((img = (struct Image *)NewObject(NULL, "sysiclass",
SYSIA_Size, MEDRES,
SYSIA_DrawInfo, dri,
SYSIA_Which, SIZEIMAGE,
TAG_DONE)))
{
width = img->Width;
height = img->Height;
DisposeObject((Object *)img);
}
FreeScreenDrawInfo(screen, dri);

Why stop it now, just when I am hating it?

Thore Böckelmann
Go to top
Re: Size gadget width
Amigans Defender
Amigans Defender


See User information
@tboeckel

I knew it would be something easy (well, on OS4 anyway), thanks.

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-2023 The XOOPS Project