Add Item (TsTitleItem) in FrameBar at runtime..??

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #34443
    kazuya85
    Participant

    hi, i'm new with alphaskins and i'm wondering that is it possible to add new item in FrameBar at runtime..??

    i've tried to get the answer from Demo Source but looks like all items inside FrameBar are created at design mode.

    i tried with this code :

    sFrameBar1.items.add;

    the code succesfully create new item in FrameBar but i don't know how to declare its caption or other property.

    the most important thing, i don't know how to insert code in it's onCreateFrame event if its created at runtime.

    please help me with this problem…

    thanks… 🙂

    #45248
    kazuya85
    Participant

    no help? 😡

    #45258
    Support
    Keymaster

    Hello, you can try such code :

    Code:
    procedure TMainForm.sBitBtn1Click(Sender: TObject);
    var
    ci : TsTitleItem;
    begin
    ci := sFrameBar1.Items.Add as TsTitleItem;
    ci.Caption := 'New item';
    ci.OnCreateFrame := sFrameBar1Items1CreateFrame;
    end;

    Here is the demo : http://www.alphaskins.com/sfiles/demos/framebar.zip

    #45311
    kazuya85
    Participant
    'Support' wrote:

    Hello, you can try such code :

    Code:
    procedure TMainForm.sBitBtn1Click(Sender: TObject);
    var
    ci : TsTitleItem;
    begin
    ci := sFrameBar1.Items.Add as TsTitleItem;
    ci.Caption := 'New item';
    ci.OnCreateFrame := sFrameBar1Items1CreateFrame;
    end;

    Here is the demo : http://www.alphaskins.com/sfiles/demos/framebar.zip

    thanks dude, u are my savior…

    #45313
    mol
    Participant

    It always helps to read the documentation and take a look at the demos, you know… 😉

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