Announcement

Collapse
No announcement yet.

Create xButtons with Raw and Colum

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • BioHazard
    replied
    charliechaps
    Well coded. Efficient, succinct and demonstrative of some nice clean logic.
    Thanks for the contribution.

    Leave a comment:


  • telco
    replied
    charliechaps thanks for your code.. this is what i am trying to achieve..

    Leave a comment:


  • charliechaps
    replied
    telco try this, we set x/y for buttons 1 , 6 & 11 then ADD 100

    Code:
    for i = 1, 15 do    
    
        xBtnProperties = {}    
        xBtnProperties.Enabled=true;
        xBtnProperties.Visible=true;
        xBtnProperties.Text="BEAT "..i;
        if i == 1 then
            xBtnProperties.X=10;
            xBtnProperties.Y=10;
            elseif i >= 2 and i <= 5 then        
        
                new = xButton.GetPos(btn).X+100;
                xBtnProperties.X=new;
                xBtnProperties.Y=10;    
            elseif i == 6 then    
                xBtnProperties.X=10;
                xBtnProperties.Y=80;
                
            elseif i >= 7 and i <= 10 then
                
                
                new = xButton.GetPos(btn).X+100;
                xBtnProperties.X=new;
                xBtnProperties.Y=80;
            elseif i == 11 then    
                xBtnProperties.X=10;
                xBtnProperties.Y=150;    
                
            elseif i >= 12 and i <= 15 then
                
                new = xButton.GetPos(btn).X+100;
                xBtnProperties.X=new;
                xBtnProperties.Y=150;    
                                  
            end
        
        xBtnProperties.Width=90;
        xBtnProperties.Height=60;
        Page.CreateObject(OBJECT_XBUTTON, "BEAT"..i, xBtnProperties);
        btn = xButton.GetProperties("BEAT"..i).ObjectName;    
     
    end
    Cheers

    Leave a comment:


  • herrin
    replied


    Code:
    [ATTACH]n303394[/ATTACH]

    Leave a comment:


  • telco
    replied
    Do you have any idea in making it using Loop? thanks

    Leave a comment:


  • telco
    replied
    Thank you herrin

    Leave a comment:


  • herrin
    replied


    Code:
    [ATTACH]n303390[/ATTACH]

    Leave a comment:


  • telco
    started a topic Create xButtons with Raw and Colum

    Create xButtons with Raw and Colum

    Hello everyone.. i was trying to create a numbers of xbutton or button on startup using loop and create object but im having a problem to align the row under after specific count.
    can anyone help me?
    in my example it will create 15 buttons.
    see image attached and apz example or if you have another way to implement it that would be a great help.

    Thank you
    Telco
    Attached Files
Working...
X