Thank you very much.
2009/6/30 Graeme Geldenhuys <grae...@opensoft.homeip.net> > kota kota wrote: > >> How can i make a window to shrink instead of losing its elements(buttons, >> labels) when it is being re-sized ? >> > > Use the Anchor property. By default the anTop and anLeft anchors are set on > all components. If you used the UI Designer to visually design your form, > then select the component (for example a Button), then in the Object > Inspector windows click the Right and Botton anchor buttons and deselect > (click them to toggle them) default Top and Left anchors. > > The UI Designer writes the gui design into a method called AfterCreate() > and it will look something like show below. > > ======================== > Button1 := TfpgButton.Create(self); > with Button1 do > begin > Name := 'Button1'; > SetPosition(504, 420, 80, 24); > Anchors := [anRight,anBottom]; > Text := 'Button'; > FontDesc := '#Label1'; > Hint := ''; > ImageName := ''; > TabOrder := 15; > end; > ======================== > > You can set the Anchors at design time and resize the design form to see > what happens. For example, setting all four anchors, the component will grow > and shrink as the form is resized. > > > Regards, > - Graeme - > > ________________________________________________ > fpGUI - a cross-platform Free Pascal GUI toolkit > http://opensoft.homeip.net/fpgui/ > > _______________________________________________ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal >
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal