@thomas
Thank you fo rthe sample. Unfortunately I won't be able to look at it this week-end. Probably not until Monday.
Out of curiosity is the clipping "problem" of the button gadget normal?
[SOLVED] Using Filler and BitMap gadgets
Re: Using Filler and BitMap gadgets
AmigaOne X1000 running AOS 4 beta
AmigaOne XE/G4
Amiga 1200/PPC 603e + BVision PPC
AmigaOne XE/G4
Amiga 1200/PPC 603e + BVision PPC
- thomasrapp
- Posts: 318
- Joined: Sun Jun 19, 2011 12:22 am
Re: Using Filler and BitMap gadgets
I am not sure what you expect and what you are doing. Normally if you attach an image to a gadget, the gadget is sized by the size of the image. No clipping is needed. Of course if you make the gadget smaller than the image (or the image bigger than the gadget), then the image renders outside of the gadget's area.
I have tried with a button gadget and if I attach an image via GA_Image to the button, the button refuses to shrink below the size of the image. So everything is fine.
If you change the size of a GUI object without notifying the GUI about the change (i.e. without calling WM_RETHINK), all strange things can happen. Normally the GUI sizes the objects and not the other way round.
I have tried with a button gadget and if I attach an image via GA_Image to the button, the button refuses to shrink below the size of the image. So everything is fine.
If you change the size of a GUI object without notifying the GUI about the change (i.e. without calling WM_RETHINK), all strange things can happen. Normally the GUI sizes the objects and not the other way round.
Re: Using Filler and BitMap gadgets
Interesting, what was the system you were using? AmigaOS 4?thomasrapp wrote:I have tried with a button gadget and if I attach an image via GA_Image to the button, the button refuses to shrink below the size of the image. So everything is fine.
When I create my GUI there is no bitmap attached to the button. Then I create a bitmap whose size fits into the button, attach it to the button using RefreshSetGadgetAttrsA() everything is fine and displays correctly. Now using the weightbar of my Layout, or the size gadget of my window the button accepts to shrink beside the size of the bitmap.thomasrapp wrote:I am not sure what you expect and what you are doing. Normally if you attach an image to a gadget, the gadget is sized by the size of the image. No clipping is needed. Of course if you make the gadget smaller than the image (or the image bigger than the gadget), then the image renders outside of the gadget's area.
If you change the size of a GUI object without notifying the GUI about the change (i.e. without calling WM_RETHINK), all strange things can happen. Normally the GUI sizes the objects and not the other way round.
Now you are right I'm not calling the method WM_RETHINK on my window, on the other hand the method's documentation is rather sparse and does not states in which conditions this method must be called. So that's probably the problem, in fact I thought this method had to be called when a direct child was modified not when an sub-object of a child (I thought it was dealt by the set method).
Thank you for your patience and your help, that's very much appreciated by the Reaction newbie I am.
AmigaOne X1000 running AOS 4 beta
AmigaOne XE/G4
Amiga 1200/PPC 603e + BVision PPC
AmigaOne XE/G4
Amiga 1200/PPC 603e + BVision PPC
Re: Using Filler and BitMap gadgets
@thomas
Thank you that was the right solution. Now I can resize my preview without any problem. Thank you very much!
Thank you that was the right solution. Now I can resize my preview without any problem. Thank you very much!
AmigaOne X1000 running AOS 4 beta
AmigaOne XE/G4
Amiga 1200/PPC 603e + BVision PPC
AmigaOne XE/G4
Amiga 1200/PPC 603e + BVision PPC