Lightbox?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #32969
    xeper
    Participant

    Hi again (sorry for flooding 🙂

    I like lightbox effect on webpages, and it surely looks good on multimedia applications (like Picasa). Plain old modal dialogs look prety poor in such context, and it happened to me several times, that some lusers didn't notice the dialog and were calling for help (It hang!)…

    So: they are useful (sometimes), certainly in fashion and IMHO are within AlphaControls' scope of interest.

    I suspect they are pretty easy to implement (looking at AnimShowControl), but I am too lame to play with this code, so did in a Red Army style 😉

    CODE
    F := TForm.CreateNew(Application, 0);
    with F do try
    Visible := False;
    AlphaBlend := True;
    AlphaBlendValue := 220;
    F.SetBounds(0, 0, Application.MainForm.Width – 10, Application.MainForm.Height – 10);
    Position := poMainFormCenter;
    BorderIcons := [];
    BorderStyle := bsNone;
    // some “content” (buttons etc.)
    with tSPanel.Create(F) do begin
    Parent := F;
    SkinData.SkinSection := 'BUTTON_HUGE';
    Width := 300;
    Height := 250;
    Font.Size := 20;
    Caption := aMsg;
    Left := (F.ClientWidth – width) div 2;
    Top := (F.ClientHeight – Height) div 2;
    end;
    Result := ShowModal;
    finally
    Free;
    end;

    Behaves like lightbox: modal, semi-transparent. But to make it look really nice one would have to make sure that:

    • this form is always darker than MainForm (which section would be best?)
    • has proper corners (eee…)
    • doesn't flicker (underlying MainForm repaints) when Alt-Tabbing as it does now :-/

    Any one could help me with that? Or better yet: add such feature to AlphaControls? 🙂

    TIA

    Michal

    PS. AC native Vista dialog wrapper/class (for XP-) would also be great :-))
    Yeah, I know: do-it-yourself. I would if I could (still not pretty sure what an alpha channel is 😉

    #39341
    Support
    Keymaster

    May be such feature will be available soon also, thanks

    Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.