1. win32lib and icons?

I'm trying to create a flattoolbar with picturebuttons on it using the
IDE, but something's screwy with the icon size. My icon is 48x48, and
Windows agrees with me there... but in the program it displays all
squashed up, probably 24x24 or 32x32..
I try to resize the button size to 48x48, but it doesn't seem to do anything...

What's happening?
-- 
MrTrick

new topic     » topic index » view message » categorize

2. Re: win32lib and icons?

Patrick Barnes wrote:
> 
> I'm trying to create a flattoolbar with picturebuttons on it using the
> IDE, but something's screwy with the icon size. My icon is 48x48, and
> Windows agrees with me there... but in the program it displays all
> squashed up, probably 24x24 or 32x32..
> I try to resize the button size to 48x48, but it doesn't seem to do
> anything...
> 
> What's happening?

By default, win32lib sets the buttons to 32x32 (actually SM_CXICON x SM_CYICON)
size. You sould be able to change this but only before you add any
buttons to it. Try running this before the first button is added...

 atom lTemp
 lTemp = w32pack_word( 48, 48 )
 VOID = sendMessage(tbar, TB_SETBUTTONSIZE, 0, lTemp)
 VOID = sendMessage(tbar, TB_SETBITMAPSIZE, 0, lTemp)


-- 
Derek Parnell
Melbourne, Australia

new topic     » goto parent     » topic index » view message » categorize

3. Re: win32lib and icons?

On Tue, 16 Nov 2004 16:16:22 -0800, Derek Parnell
<guest at rapideuphoria.com> wrote:
> > IDE, but something's screwy with the icon size. My icon is 48x48, and
> > Windows agrees with me there... but in the program it displays all
> > squashed up, probably 24x24 or 32x32..
> > I try to resize the button size to 48x48, but it doesn't seem to do
> > anything...
> >
> > What's happening?
> 
> By default, win32lib sets the buttons to 32x32 (actually SM_CXICON x
> SM_CYICON)
> size. You sould be able to change this but only before you add any
> buttons to it. Try running this before the first button is added...
> 
>  atom lTemp
>  lTemp = w32pack_word( 48, 48 )
>  VOID = sendMessage(tbar, TB_SETBUTTONSIZE, 0, lTemp)
>  VOID = sendMessage(tbar, TB_SETBITMAPSIZE, 0, lTemp)
> 

Thanks, will do.
-- 
MrTrick

new topic     » goto parent     » topic index » view message » categorize

4. Re: win32lib and icons?

On Wed, 17 Nov 2004 11:24:26 +1100, Patrick Barnes <mrtrick at gmail.com> wrote:
> > By default, win32lib sets the buttons to 32x32 (actually SM_CXICON x
> > SM_CYICON)
> > size. You sould be able to change this but only before you add any
> > buttons to it. Try running this before the first button is added...
> >
> >  atom lTemp
> >  lTemp = w32pack_word( 48, 48 )
> >  VOID = sendMessage(tbar, TB_SETBUTTONSIZE, 0, lTemp)
> >  VOID = sendMessage(tbar, TB_SETBITMAPSIZE, 0, lTemp)
> >
> 
> Thanks, will do.

Argh, there's no place to add it using the IDE... Any suggestions? I
don't want to ditch the IDE and move to pure coding yet, there's quite
a lot of GUI work left. I tried wrapping it inside a function and
putting it in the code/comments section, but it's placed *before*
tool_bar is declared.

Judith, if you're listening... Would it be possible to have an entry
in the 'events' list for controls, that is placed directly after they
are created?

-- 
MrTrick

new topic     » goto parent     » topic index » view message » categorize

5. Re: win32lib and icons?

Patrick Barnes wrote:
> 
> On Wed, 17 Nov 2004 11:24:26 +1100, Patrick Barnes <mrtrick at gmail.com>
> wrote:
> > > By default, win32lib sets the buttons to 32x32 (actually SM_CXICON x
> > > SM_CYICON)
> > > size. You sould be able to change this but only before you add any
> > > buttons to it. Try running this before the first button is added...
> > >
> > >  atom lTemp
> > >  lTemp = w32pack_word( 48, 48 )
> > >  VOID = sendMessage(tbar, TB_SETBUTTONSIZE, 0, lTemp)
> > >  VOID = sendMessage(tbar, TB_SETBITMAPSIZE, 0, lTemp)
> > >
> > 
> > Thanks, will do.
> 
> Argh, there's no place to add it using the IDE... Any suggestions? I
> don't want to ditch the IDE and move to pure coding yet, there's quite
> a lot of GUI work left. I tried wrapping it inside a function and
> putting it in the code/comments section, but it's placed *before*
> tool_bar is declared.

Nothing at this stage. I can certainly set something up in the
next version. A routine to call after the "include win32lib.ew"
and before the toolbar is created. Something like ...

   setClassProperty(FlatToolBar, "size=(48,48)")


-- 
Derek Parnell
Melbourne, Australia

new topic     » goto parent     » topic index » view message » categorize

6. Re: win32lib and icons?

On Tue, 16 Nov 2004 17:30:06 -0800, Derek Parnell
<guest at rapideuphoria.com> wrote:
> Nothing at this stage. I can certainly set something up in the
> next version. A routine to call after the "include win32lib.ew"
> and before the toolbar is created. Something like ...
> 
>    setClassProperty(FlatToolBar, "size=(48,48)")

Do you think that's something that would become standardised?

ie setClassProperty(Window, "backcolor=0x000000") ?

Ah, I see what you mean now... like the defaults for each class...
Maybe "setClassDefault" would be clearer, I initially read that as
something applied to an id returned from create().




> 
> 
> --
> Derek Parnell
> Melbourne, Australia
> 
> 
> 
> 


-- 
MrTrick

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu