Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 157 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

I see something similar here.

I figured I'd post my situation since it's a different situation (as I'm not trying to add my code into the list). Also, I didn't try to use a markup numbered list, I just numbered it myself.

For example:

  1. added a TRibbonCombobox on the ribbon bar
  2. added an event handler

    procedure TfrmRibbonDemo.RibbonComboBox1Change(Sender: TObject); begin if RibbonComboBox1.Text='Luna' then Ribbon1.Style:=RibbonLunaStyle else Ribbon1.Style:=RibbonSilverStyle; end;

On the other hand, if a list doesn't immediately precede it:

procedure TfrmRibbonDemo.RibbonComboBox1Change(Sender: TObject);
begin
  if RibbonComboBox1.Text='Luna' then
    Ribbon1.Style:=RibbonLunaStyle
    else
    Ribbon1.Style:=RibbonSilverStyle;
end;
share|improve this question
1  
Dupe of a dupe of a dupe. First one I dug up was this one: meta.stackexchange.com/questions/3327/… but there are tons of others. – Hilarious Comedy Pesto Oct 2 '09 at 20:10
  1. added a TRibbonCombobox on the ribbon bar
  2. added an event handler

    procedure TfrmRibbonDemo.RibbonComboBox1Change(Sender: TObject);
    begin
      if RibbonComboBox1.Text='Luna' then
        Ribbon1.Style:=RibbonLunaStyle
        else
        Ribbon1.Style:=RibbonSilverStyle;
    end;
    

Indent 8 spaces per the documentation, which is linked via the little "help" icon in the upper right of toolbar, and again on the right sidebar when editing.

share|improve this answer
1  
But what if you don't want the code as part of list item 2. ? – Jonathon Reinhart Jul 22 '12 at 18:58

Handler Demo With continues Progress bar for Anroid

import android.app.Activity; import android.app.ProgressDialog; import android.os.Bundle; import android.os.Message; import android.view.KeyEvent; import android.widget.TextView;

public class Handler extends Activity {

private ProgressDialog pd;
private TextView tv;
private android.os.Handler hand, handler;



/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    pd = ProgressDialog.show(this, "please wait...","retrive ddata...", true);
    tv = (TextView) findViewById(R.id.text);

    hand = new android.os.Handler()
    {
        @Override
        public void handleMessage(Message msg) 
        {
            // TODO Auto-generated method stub
            super.handleMessage(msg);
            System.out.println("in handler---------->");
            pd.dismiss();
            handler.sendEmptyMessageDelayed(0, 3000);
        }

     };

     hand.sendEmptyMessageDelayed(0, 5000);  // handleMessage() call from here

     handler = new android.os.Handler()
     {
         @Override
         public void handleMessage(Message msg) 
         {
             // TODO Auto-generated method stub
             super.handleMessage(msg);
             pd.show();
             hand.sendEmptyMessageDelayed(0, 5000);
         }
      };

} //end of onCreate method

} //end of main class

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .