power-media / prado3

Automatically exported from code.google.com/p/prado3
Other
0 stars 0 forks source link

Patch: Add ToolTip and AlternateText to TButtonColumn #459

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I propose the following patch to automagically set the ToolTip (and 
AlternatText) property of the CommandButton.

Cheers,
Raoul
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - 
index 7a0484c..cf2c355 100644
--- a/framework/Web/UI/WebControls/TButtonColumn.php
+++ b/framework/Web/UI/WebControls/TButtonColumn.php
@@ -237,7 +237,9 @@ class TButtonColumn extends TDataGridColumn
                        {
                                $button=new TImageButton;
                                $button->setImageUrl($this->getImageUrl());
+                               $button->setAlternateText($this->getText());
                        }
+                       $button->setToolTip($this->getText());
                        $button->setText($this->getText());
                        $button->setCommandName($this->getCommandName());
                        $button->setCausesValidation($this->getCausesValidation());
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - 

Original issue reported on code.google.com by ra...@bhatia.at on 29 Apr 2013 at 4:22

GoogleCodeExporter commented 8 years ago
TButtonColumn internally uses TImageButton. When you set a text on 
TImageButton, the text gets rendered as the image alternate text, so this was 
already working.
The tooltip was missing, and has been added in r3287, thank you.

Original comment by ctrlal...@gmail.com on 30 Apr 2013 at 10:12