Help with the creation of an object and respond to the option On Click

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • homes
    Forum Member
    • Dec 2006
    • 62

    Help with the creation of an object and respond to the option On Click

    I think this OBJECT_BUTTON of the form:
    tblButtonPos = {};
    tblButtonPos.Opacity = 75;
    tblButtonPos.Left = 300;
    tblButtonPos.Top = 15;
    tblButtonPos.GetState = BTN_UP;
    tblButtonPos.Enabled = true;
    tblButtonPos.Visible = true;
    tblButtonPos.X = 160;
    tblButtonPos.Y = 20;
    tblButtonPos.Width = 500;
    tblButtonPos.Height = 25;
    tblButtonPos.Cursor = HAND;

    for n=1, 4 do
    -- Create the 4 object Button
    Page.CreateObject(OBJECT_BUTTON, "XPBarButton"..n, tblButtonPos);

    end

    I can I respond to the following code?:


    if Button.GetState("XPBarButton"..n) == BTN_DOWN then
    SetGroupVisible("grp"..n, true)
    else
    SetGroupVisible("grp"..n, false)
    end

    ---I would be very grateful for their collaboration
  • holtgrewe
    Indigo Rose Customer
    • Jul 2002
    • 779

    #2
    homes

    You probably want to use the Page.SetObjectScript(ObjectName, EventName, Script) for each object right after creating the buttons. That could set the OnClick event for the buttons...

    I hope that's what you're looking for...

    Comment

    Working...
    X