Microsoft Windows: A thirty-two bit extension and graphical shell to a sixteen-bit patch to an eight-bit operating system originally coded for a four-bit microprocessor which was written by a two-bit company that can't stand one bit of competition
Verwijderd
Volgens mij kun je dit ook voor elkaar krijgen met "standaard" windows events, maar dan zul je alsnog die vierkantjes moeten tekenen.
We adore chaos because we like to restore order - M.C. Escher
en wat bedoel je dan precies met die standaard windows events?Verwijderd schreef op woensdag 30 november 2005 @ 17:27:
[...]
Volgens mij kun je dit ook voor elkaar krijgen met "standaard" windows events, maar dan zul je alsnog die vierkantjes moeten tekenen.
Microsoft Windows: A thirty-two bit extension and graphical shell to a sixteen-bit patch to an eight-bit operating system originally coded for a four-bit microprocessor which was written by a two-bit company that can't stand one bit of competition
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
| function TForm1.ScaleBmp(bitmp: TImage; Amount: Integer): Boolean; var TmpBmp: TBitmap; ARect: TRect; h, w: Integer; begin Result := False; if bitmp.Height + Amount >= 10 then begin try //Stretch the image by Amount TmpBmp := TBitmap.Create; try h := bitmp.Height + Amount; w := bitmp.Width + Amount; TmpBmp.Width := w; TmpBmp.Height := h; ARect := Rect(0, 0, w, h); TmpBmp.Canvas.StretchDraw(ARect, Bitmp); bitmp.Assign(TmpBmp); finally TmpBmp.Free; end; Result := True; except Result := False; end; end; end; |
ow.. ik zie nu dat je een paintbox gebruikt
[ Voor 5% gewijzigd door HammerT op 01-12-2005 12:01 ]
Mijn idee voor een nieuwe versie is om een apart object te maken die het resizen afhandeld. Om dan een component te resizen, maak je in het resize-object een verwijzing naar het te resizen object.Alle events die worden gebruikt bij het resizen worden afgevangen door het resize-object, welke op zijn beurt weer de properties van het te resizen component aanpast.
- This line is intentionally left blank -
als er nog meer mensen zijn met ideeen/suggesties/adviezen, dan hoor ik het graag.
Microsoft Windows: A thirty-two bit extension and graphical shell to a sixteen-bit patch to an eight-bit operating system originally coded for a four-bit microprocessor which was written by a two-bit company that can't stand one bit of competition
Verwijderd
Je kan wat events afvangen en manipuleren, dan zou het moeten lukken...Tombo_inc schreef op donderdag 01 december 2005 @ 21:57:
er zijn dus ook geen ingebakken functies in windows/delphi om te resizen concludeer ik uit de reacties. dit wou ik even verifieren omdat dat natuurlijk makkelijker zou zijn, en je waarschijnlijk wat performance loss zou besparen.
Google Groups link
Je moet zelf ff verder zoeken, want het kan wel. Het wordt denk ik wat 'ingewikkelder' als je ook iets wilt laten zien tijdens het resizen.
[ Voor 11% gewijzigd door Verwijderd op 01-12-2005 23:55 ]
ik denk dat ik hier wel iets aan heb. ik zal het eens op mijn gemak gaan bekijken.
Microsoft Windows: A thirty-two bit extension and graphical shell to a sixteen-bit patch to an eight-bit operating system originally coded for a four-bit microprocessor which was written by a two-bit company that can't stand one bit of competition