[Lazarus] multi step dialog

Mark Morgan Lloyd markMLl.lazarus at telemetry.co.uk
Wed Aug 19 10:19:42 CEST 2015


Tony Whyman wrote:
> On 17/08/15 07:59, Graeme Geldenhuys wrote:
>> In fpGUI I simply use a PageControl and set TabPosition = None. In
>> Delphi 5-7 and Kylix I used to do similar, but can't remember what exact
>> control I used... might have been PageControl too.
>>
>> Regards,
>>    - Graeme -
>>
> 
> 
> A TPageControl is also what I use to get a multi-step dialog.
> 
> Set "ShowTabs" to false and make each step a page in the pagecontrol. 
> The Form's OnShow Handler should set the initial tab index e.g.
> 
> PageControl1.TabIndex := 0;
> 
> Place the forward/back buttons outside of the pagecontrol and make the 
> body of each button's "OnClick" handler a case statement

With the caveat there that that can benefit from having frames support. 
Obviously that's not such an issue now, but I've still got a few 
programs knocking around which due to e.g. slightly dodgy database code 
I've not yet ported to the versions of Lazarus and FPC where this became 
reliable.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]




More information about the Lazarus mailing list