Index: modules/homebox/homebox-admin-display-form.tpl.php
===================================================================
--- modules/homebox/homebox-admin-display-form.tpl.php	(revision 53699)
+++ modules/homebox/homebox-admin-display-form.tpl.php	(revision )
@@ -23,6 +23,7 @@
       <th><?php print t('Region'); ?></th>
       <th><?php print t('Custom title'); ?></th>
       <th><?php print t('Weight'); ?></th>
+      <th><?php print t('Max to Show'); ?></th>
       <th><?php print t('Visible'); ?></th>
       <th><?php print t('Open'); ?></th>
       <th><?php print t('Movable'); ?></th>
@@ -46,7 +47,8 @@
         <td><?php print $data->region_select; ?></td>
         <td><?php print $data->title; ?></td>
         <td><?php print $data->weight_select; ?> <?php print $data->bid ?></td>
+          <td><?php print $data->maxToShow; ?></td>
-        <td><?php print $data->status; ?></td>
+          <td><?php print $data->status; ?></td>
         <td><?php print $data->open; ?></td>
         <td><?php print $data->movable; ?></td>
         <td><?php print $data->closable; ?></td>
Index: modules/homebox/homebox.admin.inc
===================================================================
--- modules/homebox/homebox.admin.inc	(revision 53699)
+++ modules/homebox/homebox.admin.inc	(revision )
@@ -376,6 +376,7 @@
       $block['open']    = (bool) $hb['open'];
       $block['closable'] = (bool) $hb['closable'];
       $block['title'] = $hb['title'];
+      $block['maxToShow'] = $hb['maxToShow'];
     }
     // Set defaults.
     else {
@@ -384,6 +385,7 @@
       $block['status']  = TRUE;
       $block['open']    = TRUE;
       $block['closable'] = TRUE;
+      $block['maxToShow'] = '';
     }
   }
 
@@ -471,6 +473,11 @@
       '#default_value' => $block['title'],
       '#size' => 15,
     );
+    $form[$key]['maxToShow'] = array(
+      '#type' => 'textfield',
+      '#default_value' => $block['maxToShow'],
+      '#size' => 2,
+    );
     $form[$key]['status'] = array(
       '#type' => 'checkbox',
       '#default_value' => $block['status'],
@@ -525,6 +532,7 @@
         'delta' => $block['delta'],
         'region' => (int) $block['region'],
         'movable' => (int) $block['movable'],
+        'maxToShow' => (int) $block['maxToShow'],
         'status' => (int) $block['status'],
         'open' => (int) $block['open'],
         'closable' => (int) $block['closable'],
@@ -631,6 +639,7 @@
       $variables['block_listing'][$region][$i]->region_select = drupal_render($block['region']) . drupal_render($block['theme']);
       $variables['block_listing'][$region][$i]->title = drupal_render($block['title']);
       $variables['block_listing'][$region][$i]->weight_select = drupal_render($block['weight']);
+      $variables['block_listing'][$region][$i]->maxToShow = drupal_render($block['maxToShow']);
       $variables['block_listing'][$region][$i]->status = drupal_render($block['status']);
       $variables['block_listing'][$region][$i]->open = drupal_render($block['open']);
       $variables['block_listing'][$region][$i]->movable = drupal_render($block['movable']);
Index: modules/homebox/homebox.module
===================================================================
--- modules/homebox/homebox.module	(revision 53699)
+++ modules/homebox/homebox.module	(revision )
@@ -307,7 +307,7 @@
 function homebox_build($page) {
   global $user;
 
-  // If no default block layout is set, return a simple message
+   // If no default block layout is set, return a simple message
   if (empty($page->settings['blocks'])) {
     return t('This page has not yet been configured.');
   }
@@ -320,7 +320,7 @@
   $blocks = $page->settings['blocks'];
   $allowed_blocks = array();
   $info = array();
-  foreach ($page->settings['blocks'] as $block) {
+  foreach ($page->settings['blocks'] as $key => $block) {
     if (!isset($info[$block['module']])) {
       $info[$block['module']] = module_invoke($block['module'], 'block', 'list');
     }
@@ -328,6 +328,7 @@
     if (!empty($block['title'])) {
       $allowed_blocks[$block['module']][$block['delta']]['info'] = $block['title'];
     }
+    $allowed_blocks[$block['module']][$block['delta']]['maxToShow'] = (!empty($block['maxToShow']))? $block['maxToShow'] : 0;;
   }
 
   // Get user settings, so custom blocks are placed in regions.
@@ -369,6 +370,10 @@
         if (isset($info['used'])) {
           $options['attributes'] = array('class' => 'used');
         }
+        $maxToShow = (!empty($info['maxToShow']))? $info['maxToShow'] : 0;
+        if(is_numeric($maxToShow) && 0<$maxToShow){
+            $options['attributes']['onclick'] = "if($maxToShow > jQuery('[id*=\'homebox-block-{$module}_$delta\']:visible').length){return true;}else{alert('You can only open $maxToShow {$info['info']} panel.');return false;}";
+        }
         $add_links[] = homebox_add_link($info['info'], $page, $module, $delta, $options);
       }
     }
@@ -1041,6 +1046,7 @@
         case 'cache':
         case 'full':
         case 'color':
+        case 'maxToShow':
           // Check that the previous are numeric values
           if (!is_numeric($value)) {
             $status = FALSE;
