Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Elegant Ribbon Tech Support » Click on a recentDocumentsControl and set caption of recentDocumentsControl Collapse All
Subject Author Date
Gunter Avenius Nov 12, 2007 - 8:28 AM

Hello,

VB 2005, RibbonControl 2.1

1. How can i change the Caption from "Recent Documents" to an other Text?

2. I have add the following Code to add Items to the Recent Documents.

recentDocumentsControl.Items.Add("First.docx")
recentDocumentsControl.Items.Add("Second.docx")
recentDocumentsControl.Items.Add("Next.docx")
ApplicationMenu1.RightPaneControl = recentDocumentsControl

How can i get the text of the Control when i click on a Button eg: "Second.docx"

Best regards
Gunter Avenius

Gunter Avenius Nov 12, 2007 - 10:37 AM

Hello,

Great! Thanks

Best regards
Gunter Avenius

Technical Support Nov 12, 2007 - 10:15 AM

Here is the code you are looking for

Public Sub New()
   InitializeComponent()

   Dim recentDocumentsControl As RecentDocumentsControl = New RecentDocumentsControl()

   recentDocumentsControl.Items.Add("1")
   recentDocumentsControl.Items.Add("2")

   AddHandler recentDocumentsControl.ItemClick, AddressOf RecentDocumentsControl_ItemClick
End Sub

Private Sub RecentDocumentsControl_ItemClick(ByVal sender As Object, ByVal e As RecentDocumentsControlItemClickEventArgs)
   Dim s As String = TryCast(e.Item, String) ’ clicked item
End Sub

Gunter Avenius Nov 12, 2007 - 8:57 AM

Hello,

thanks for the reply.

Can you giv eme a sample code (vb2005) for:

I have add the following Code to add Items to the Recent Documents.

recentDocumentsControl.Items.Add("First.docx")
recentDocumentsControl.Items.Add("Second.docx")
recentDocumentsControl.Items.Add("Next.docx")
ApplicationMenu1.RightPaneControl = recentDocumentsControl

How can i get the text of the Control when i click on a Button eg: "Second.docx"

Thanks
Gunter Avenius

Technical Support Nov 12, 2007 - 8:52 AM

Unfortunately, you cannot change the caption at the moment. But in the new version, the Caption property is added to the RecentDocumentsControl class. The new version should be released tomorrow.

Gunter Avenius Nov 16, 2007 - 9:58 AM

Hello,

Thanks. It works :-)

Best regards
Gunter Avenius