TImageButton creates an image button on the page. It is used to submit data to a page.
You can create either a
button has a command name (specified by
the {@link setCommandName CommandName} property) and and a command parameter
(specified by {@link setCommandParameter CommandParameter} property)
associated with the button. This allows you to create multiple TLinkButton
components on a Web page and programmatically determine which one is clicked
with what parameter. You can provide an event handler for
{@link onCommand OnCommand} event to programmatically control the actions performed
when the command button is clicked. In the event handler, you can determine
the {@link setCommandName CommandName} property value and
the {@link setCommandParameter CommandParameter} property value
through the {@link TCommandParameter::getName Name} and
{@link TCommandParameter::getParameter Parameter} properties of the event
parameter which is of type {@link \Prado\Web\UI\TCommandEventParameter}.
A
button does not have a command name associated with the button
and clicking on it simply posts the Web page back to the server.
By default, a TImageButton control is a submit button.
You can provide an event handler for the {@link onClick OnClick} event
to programmatically control the actions performed when the submit button is clicked.
The coordinates of the clicking point can be obtained from the {@link onClick OnClick}
event parameter, which is of type {@link TImageClickEventParameter}.
Clicking on button can trigger form validation, if
{@link setCausesValidation CausesValidation} is true.
And the validation may be restricted within a certain group of validator
controls by setting {@link setValidationGroup ValidationGroup} property.
If validation is successful, the data will be post back to the same page.
TImageButton displays the {@link setText Text} property as the hint text to the displayed image.
getPostBackOptions()
защищенный Метод
This method is used by framework and control developers.
getText()
публичный Метод
loadPostData()
публичный Метод
This method is primarly used by framework developers.
needPostBackScript()
защищенный Метод
raisePostBackEvent()
публичный Метод
This method is required by {@link IPostBackEventHandler} interface.
If {@link getCausesValidation CausesValidation} is true, it will
invoke the page's {@link TPage::validate validate} method first.
It will raise {@link onClick OnClick} and {@link onCommand OnCommand} events.
This method is mainly used by framework and control developers.
raisePostDataChangedEvent()
публичный Метод
A dummy implementation for the \Prado\Web\UI\IPostBackDataHandler interface.
renderContents()
публичный Метод
This overrides the parent implementation with nothing to be rendered.
setText()
публичный Метод