﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » How to access GradientFormHeader properties?</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 05:48:23 GMT</lastBuildDate><ttl>20</ttl><item><title>How to access GradientFormHeader properties?</title><link>http://forum.strataframe.net/FindPost19974.aspx</link><description>When you create a new instance of a form which has a GradientFormHeader I have found no way to access the GradientFormHeader properties like Title and DetailText pretty much like we can do with a BrowserDialog.HeaderTitle, I would like to be able to do this: &lt;P&gt;[codesnippet]&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;/P&gt;&lt;P&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; f &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; ReportViewerDialog()&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size=2&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;STRONG&gt;f.rptViewer.HeaderTitle = "My nice header title"&lt;/STRONG&gt;&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;STRONG&gt;f.rptViewer.DetailText = "My nice detail text sample"&lt;/STRONG&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;/FONT&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;Can this be done now, or will this fall into an Enhancement Request?&lt;/P&gt;&lt;P&gt;Thanks!</description><pubDate>Fri, 10 Oct 2008 09:24:13 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: How to access GradientFormHeader properties?</title><link>http://forum.strataframe.net/FindPost19993.aspx</link><description>Thank you Trent, got it!</description><pubDate>Fri, 10 Oct 2008 09:24:13 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: How to access GradientFormHeader properties?</title><link>http://forum.strataframe.net/FindPost19992.aspx</link><description>This will work, but I might suggest creating properties to expose the title, etc. instead of just exposing the object.&amp;nbsp; Technically this violates encapsulation and if you were to rename the gradient form header, all of your programs would break.&amp;nbsp; But if you had a property on your base form called Title, or HeaderImage, then it would only be a matter of changing this in the base form versus every program in your app that has referenced this object.&amp;nbsp; Just a thought and recommendation.</description><pubDate>Fri, 10 Oct 2008 09:19:35 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: How to access GradientFormHeader properties?</title><link>http://forum.strataframe.net/FindPost19977.aspx</link><description>Glad it worked.  My preference in a situation like this would be the custom properties too....but I like choice :D</description><pubDate>Thu, 09 Oct 2008 12:38:01 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: How to access GradientFormHeader properties?</title><link>http://forum.strataframe.net/FindPost19976.aspx</link><description>Thanks Greg,&lt;/P&gt;&lt;P&gt;That is exactly what I needed, they both work fine.&amp;nbsp; I choose to create the custom properties since that will make more sense to set at the form level like f.Title instead of f.GradientFormHeader.Title.</description><pubDate>Thu, 09 Oct 2008 10:30:51 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: How to access GradientFormHeader properties?</title><link>http://forum.strataframe.net/FindPost19975.aspx</link><description>What I've done is just expose those properties via public properties of the form:&lt;br&gt;
&lt;br&gt;
[codesnippet]Public Property Title As String&lt;br&gt;
&amp;nbsp;&amp;nbsp;Get&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Return Me.GradientHeader1.Title&lt;br&gt;
&amp;nbsp;&amp;nbsp;End Get&lt;br&gt;
&amp;nbsp;&amp;nbsp;Set(value As String)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Me.GradientHeader1.Title = value&lt;br&gt;
&amp;nbsp;&amp;nbsp;End Set&lt;br&gt;
End Property[/codesnippet]&lt;br&gt;
&lt;br&gt;
The other option would be to make the gradient header public, using the Modifier property:&lt;br&gt;
&lt;br&gt;
[img]http://www.gregmcguffey.org/SF_Posts/PublicModifier-20081009/ControlModifier.png[/img]&lt;br&gt;
&lt;br&gt;
Then you could use code like:&lt;br&gt;
&lt;br&gt;
[codesnippet]MyForm.GradientHeader1.Title = "My Title"[/codesnippet]&lt;br&gt;
&lt;br&gt;
I don't see any way for SF to know how you'd compose your forms to automatically provide this sort of functionality though.  Fortunately it's not hard to get working though! :D</description><pubDate>Thu, 09 Oct 2008 10:17:29 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item></channel></rss>