Xbasic methods for the HTML and HTMLHOST Xdialog Commands
- <HTMLObject>.NavigateFirst as l()
- <HTMLObject>.NavigateLast as l()
- <HTMLObject>.NavigateNext as l()
- <HTMLObject>.NavigatePrev as l()
- <HTMLObject>.GetElemRect as c(id as c)
- <HTMLObject>.GetAttribute as c(id as c,attrib as c)
- <HTMLObject>.SetAttribute as v(id as c,attrib as c,value as c)
- <HTMLObject>.GetValue as c(id as c)
- <HTMLObject>.SetValue as v(id as c,value as c)
- <HTMLObject>.SetInnerHtml as v(id as c,html as c)
- <HTMLObject>.SetOuterHtml as v(id as c,html as c)
- <HTMLObject>.GetInnerHtml as c(id as c)
- <HTMLObject>.GetOuterHtml as c(id as c)
- <HTMLObject>.GetFocus as c()
- <HTMLObject>.SetFocus as l(id as c)
- <HTMLObject>.GetChecked as l(id as c)
- <HTMLObject>.SetChecked as v(id as c,checked as l)
- <HTMLObject>.MakeVisible as l(id as c)
- <HTMLObject>.Invalidate as v(id as c)
- <HTMLObject>.GetIdFromPoint as c(x as n,y as n)
- <HTMLObject>.EditCopy as v()
- <HTMLObject>.EditPaste as v()
- <HTMLObject>.EditDelete as v()
- <HTMLObject>.EditSelect as v(start_char as n = 0,end_char as n = -1)
- <HTMLObject>.EditSupportsMultiLine as l()
- <HTMLObject>.GetRememberedAttributes as c()
- <HTMLObject>.SetRememberedAttributes as v(rememberList as c)
Description
This article describes the new Xbasic methods that can be used on the HTML that is rendered by either the {html} or new {htmlhost} commands.
This is how we documented that you use the {html} command
dim htmlTextVariable as c htmlTextVariable = <<%html% <b>Hello World</b> %html% ui_dlg_box("HTML",<<%dlg% {html=100,20htmlTextVariable}; %dlg%)
However, if you want to use methods, you must use this syntax (differences highlighted in red):
dim htmlTextVariable as c htmlTextVariable = <<%html% <b>Hello World</b> %html% dim pHTML as p dim pHTML.object as p dim pHTML.text as c = htmlTextVariable ui_dlg_box("HTML",<<%dlg% {html=100,20pHhtml}; %dlg%)
<HTMLObject>.NavigateFirst as l()
Navigate to first element (return true if succeeded).
<HTMLObject>.NavigateLast as l()
Navigate to last element (return true if succeeded).
<HTMLObject>.NavigateNext as l()
Navigate to the next element in the html (return true if succeeded).
<HTMLObject>.NavigatePrev as l()
Navigate to the previous element in the html (return true if succeeded).
<HTMLObject>.GetElemRect as c(id as c)
Returns rectangle for id.
<HTMLObject>.GetAttribute as c(id as c,attrib as c)
Get an attribute value from a element.
<HTMLObject>.SetAttribute as v(id as c,attrib as c,value as c)
Set an attribute value for a element.
<HTMLObject>.GetValue as c(id as c)
Returns value from a control.
<HTMLObject>.SetValue as v(id as c,value as c)
Sets value to a control.
<HTMLObject>.SetInnerHtml as v(id as c,html as c)
Sets inner HTML for control.
<HTMLObject>.SetOuterHtml as v(id as c,html as c)
Sets outer HTML for control.
<HTMLObject>.GetInnerHtml as c(id as c)
Sets inner HTML for control.
<HTMLObject>.GetOuterHtml as c(id as c)
Sets outer HTML for control.
<HTMLObject>.GetFocus as c()
Return the id of the element that has focus.
<HTMLObject>.SetFocus as l(id as c)
Sets focus to object of given id.
<HTMLObject>.GetChecked as l(id as c)
Get the elements checked state.
<HTMLObject>.SetChecked as v(id as c,checked as l)
Set the element as checked.
<HTMLObject>.MakeVisible as l(id as c)
Make control with id visible.
<HTMLObject>.Invalidate as v(id as c)
Repaint a control.
<HTMLObject>.GetIdFromPoint as c(x as n,y as n)
Gets first object with an Id, returns the id.
<HTMLObject>.EditCopy as v()
Copy to the clipboard.
<HTMLObject>.EditPaste as v()
Paste from the clipboard.
<HTMLObject>.EditDelete as v()
Delete the text.
<HTMLObject>.EditSelect as v(start_char as n = 0,end_char as n = -1)
Select text in the current editor.
<HTMLObject>.EditSupportsMultiLine as l()
Does editor support multi-line (i.e. send returns & paging to control).
<HTMLObject>.GetRememberedAttributes as c()
Returns cl-lf delimited list of remembered attributes & their values.
<HTMLObject>.SetRememberedAttributes as v(rememberList as c)
Pass in an previously saved list of attributes that we want to restore.
See Also