SWF Edit Native Properties & Methods - Codoid
Select Page
Codoid Blog

SWF Edit Native Properties & Methods

Being a leading QA Company, we write blogs on all prominent software testing topics and tools using our real-world experience. So stay sharp by subscribing to our Newsletter.

Font Details

Confirming whether textbox’s font is bold or not

Msgbox SwfWindow("Form").SwfEdit("Edit").Object.Font.Bold
'The above line returns true, if the editbox’s font is bold else false.
  

Getting applied font name

Msgbox SwfWindow("Form").SwfEdit("Edit").Object.Font.FontFamily.Name
  

Retrieving Font size

Msgbox SwfWindow("Form").SwfEdit("Edit").Object.Font.Size
  

Text Selection

Selecting all text

SwfWindow("Form").SwfEdit("Edit").Object.SelectAll
  

Selecting a range of text

SwfWindow("Form").SwfEdit("Edit").Object.Select 0,3
'Selects the text from first character to fourth character
  

Retrieving Selected text and starting postion

Msgbox SwfWindow("Form").SwfEdit("Edit").Object.SelectedText
'Gets the selected text

Msgbox SwfWindow("Form").SwfEdit("Edit").Object.SelectionStart
'Gets statring postion of selceted text
  

Appending text

SwfWindow("Form").SwfEdit("Edit").Object.AppendText("QTP")
  

Pasting clipboard value

SwfWindow("Form").SwfEdit("Edit").Object.Paste
  

Submit a Comment

Your email address will not be published.

Font Details

Confirming whether textbox’s font is bold or not

Msgbox SwfWindow("Form").SwfEdit("Edit").Object.Font.Bold
'The above line returns true, if the editbox’s font is bold else false.
  

Getting applied font name

Msgbox SwfWindow("Form").SwfEdit("Edit").Object.Font.FontFamily.Name
  

Retrieving Font size

Msgbox SwfWindow("Form").SwfEdit("Edit").Object.Font.Size
  

Text Selection

Selecting all text

SwfWindow("Form").SwfEdit("Edit").Object.SelectAll
  

Selecting a range of text

SwfWindow("Form").SwfEdit("Edit").Object.Select 0,3
'Selects the text from first character to fourth character
  

Retrieving Selected text and starting postion

Msgbox SwfWindow("Form").SwfEdit("Edit").Object.SelectedText
'Gets the selected text

Msgbox SwfWindow("Form").SwfEdit("Edit").Object.SelectionStart
'Gets statring postion of selceted text
  

Appending text

SwfWindow("Form").SwfEdit("Edit").Object.AppendText("QTP")
  

Pasting clipboard value

SwfWindow("Form").SwfEdit("Edit").Object.Paste