Aspose::Words::Framesets::Frameset class
Contents
[
Hide
]Frameset class
Represents a frames page or a single frame on a frames page. To learn more, visit the Programming with Documents documentation article.
class Frameset : public System::Object
Methods
| Method | Description |
|---|---|
| Frameset() | |
| get_ChildFramesets() const | Gets the collection of child frames and frames pages. |
| get_FrameDefaultUrl() | Gets or sets the web page URL or document file name to display in this frame. |
| get_IsFrameLinkToFile() | Gets or sets a value indicating whether the web page or document file name specified in the FrameDefaultUrl property is an external resource the frame is linked with. |
| set_FrameDefaultUrl(const System::String &) | Sets the web page URL or document file name to display in this frame. |
| set_IsFrameLinkToFile(bool) | Sets a value indicating whether the web page or document file name specified in the FrameDefaultUrl property is an external resource the frame is linked with. |
Remarks
If the ChildFramesets property contains items, this instance is a frames page, otherwise it is a single frame.
Examples
Shows how to access frames on-page.
// Document contains several frames with links to other documents.
auto doc = System::MakeObject<Aspose::Words::Document>(System::String(get_MyDir() + u"Frameset.docx"));
ASSERT_EQ(doc->get_Frameset()->get_ChildFramesets()->get_Count(), 3);
// We can check the default URL (a web page URL or local document) or if the frame is an external resource.
ASSERT_EQ(doc->get_Frameset()->get_ChildFramesets()->idx_get(0)->get_ChildFramesets()->idx_get(0)->get_FrameDefaultUrl(), u"https://file-examples-com.github.io/uploads/2017/02/file-sample_100kB.docx");
ASSERT_TRUE(doc->get_Frameset()->get_ChildFramesets()->idx_get(0)->get_ChildFramesets()->idx_get(0)->get_IsFrameLinkToFile());
ASSERT_EQ(doc->get_Frameset()->get_ChildFramesets()->idx_get(1)->get_FrameDefaultUrl(), u"Document.docx");
ASSERT_FALSE(doc->get_Frameset()->get_ChildFramesets()->idx_get(1)->get_IsFrameLinkToFile());
// Change properties for one of our frames.
doc->get_Frameset()->get_ChildFramesets()->idx_get(0)->get_ChildFramesets()->idx_get(0)->set_FrameDefaultUrl(u"https://github.com/aspose-words/Aspose.Words-for-.NET/blob/master/Examples/Data/Absolute%20position%20tab.docx");
doc->get_Frameset()->get_ChildFramesets()->idx_get(0)->get_ChildFramesets()->idx_get(0)->set_IsFrameLinkToFile(false);
See Also
- Namespace Aspose::Words::Framesets
- Library Aspose.Words for C++