Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - ReportControl as TreeView
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ReportControl as TreeView

 Post Reply Post Reply
Author
Message
tobi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 September 2004
Location: Germany
Status: Offline
Points: 451
Post Options Post Options   Thanks (0) Thanks(0)   Quote tobi Quote  Post ReplyReply Direct Link To This Post Topic: ReportControl as TreeView
    Posted: 09 April 2009 at 8:36am
Hi,
 
Iīm trying to use ReportControl as replacement for the standard treeview control.
By doing this I want to archive the look & feel as simmilar as possible to treeview.
So I have some questions how to do this:
 
1) Can I replace the [+] and [-] icons to smaller ones ?
2) Can I display an icon next to this icons
3) Can I make selection only the text and not the whole column width ?
4) How can I implement drag & drop ?
 
Any comments or sample code ( c# prefered ) would be very nice ...
 
Thanks a lot
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 09 April 2009 at 11:09pm
Look in current Report sample with IconView implemented. I also like somebody make simple but usefull sample - File Explorer based on Report Control - with Tree-like control for Folders.
Back to Top
tobi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 September 2004
Location: Germany
Status: Offline
Points: 451
Post Options Post Options   Thanks (0) Thanks(0)   Quote tobi Quote  Post ReplyReply Direct Link To This Post Posted: 13 April 2009 at 10:18am
Which sample do you mean ? Canīt find something about IconView !
Canīt you provide such FileExplorer sample ?
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 13 April 2009 at 10:33am
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 16 April 2009 at 2:20pm
As for tree view - look in current ReportSample - https://forum.codejock.com/uploads/DemoVersion/ReportSampleSatic.rar
here run from menu Report Control - Control Test - Tree View Dialog
here run from menu Report Control - Control Test - Properties Test (here you have new version of SelectAll button "A" and old version "a")
you can add branches to any item with mouse right button click
 
Back to Top
tobi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 September 2004
Location: Germany
Status: Offline
Points: 451
Post Options Post Options   Thanks (0) Thanks(0)   Quote tobi Quote  Post ReplyReply Direct Link To This Post Posted: 17 April 2009 at 8:17am
Hi Mark,
 
thank you very much for your answers and samples ! But they donīt really solve my questions/problems.
I have to do a visual appearence as most as identical to a treeview - combined with the features of ReportControl (e.g. Markup ).
 
Please have a look at the attached picture - this is how it should look like ...
 
 
Please let me know if this is possible with ReportControl ...
 
Thanks a lot
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 17 April 2009 at 9:16am
Techically - yes you can do it. Logically - in term of file structure hierarchy - it depends. See how Microsoft is moving to simplified top-level virtual file structure - all this MyDocuments and similar are attempts to hide complicated file tree and present it in more simple way.
Back to Top
tobi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 September 2004
Location: Germany
Status: Offline
Points: 451
Post Options Post Options   Thanks (0) Thanks(0)   Quote tobi Quote  Post ReplyReply Direct Link To This Post Posted: 17 April 2009 at 9:35am
Dear Mark,
 
I do not need to display file system structure. It just should show how it should look like !
Do you think you could provide me a sample in VB6 or .net how I can do this ?
 
Thank you
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 17 April 2009 at 9:42am
In this case you already had it ..\Samples\ActiveX\ReportControl\VB\ReportSample with frmTreeView.frm. Use it as starting point.
Back to Top
tobi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 September 2004
Location: Germany
Status: Offline
Points: 451
Post Options Post Options   Thanks (0) Thanks(0)   Quote tobi Quote  Post ReplyReply Direct Link To This Post Posted: 17 April 2009 at 10:23am
So we are back at my initial questions:
 
1) Can I replace the [+] and [-] icons to smaller ones ?
2) Can I display an icon next to this icons
3) Can I make selection only the text and not the whole column width ?
 
I donīt know how to do this with ReportControl ...
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 17 April 2009 at 10:45am
1st  question - as far as you assign your own icons - may be. Try....
2nd question - yes - try this code modification for citated sample - you will have +/- AND extra ICON
Function AddReportRecord(Parent As ReportRecord, Read As Boolean, Subject As String, From As String, Sent As Date, Size As Long, Price As Single) As ReportRecord
 
    ' Adds a record to current ReportControl.
  
    Dim Record As ReportRecord
   
    If Parent Is Nothing Then
        Set Record = wndReportControl.Records.Add()
    Else
        Set Record = Parent.Childs.Add()
    End If
   
    Dim Item As ReportRecordItem
   
    Set Item = Record.AddItem("")
    Item.Icon = IIf(Read, 3, 2)
   
    Set Item = Record.AddItem("")
    Item.HasCheckbox = True
    Item.TristateCheckbox = True
    Item.Checked = True
   
    Set Item = Record.AddItem(Subject)
    Item.Icon = 3
   
    Record.AddItem From
    Record.AddItem Sent
    Record.AddItem Size
    Set Item = Record.AddItem(Price)
    Item.Format = "$ %s"
   
    Set AddReportRecord = Record
End Function
3rd question - sure - as you allow to select subitems - there is a flag for this
Back to Top
tobi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 September 2004
Location: Germany
Status: Offline
Points: 451
Post Options Post Options   Thanks (0) Thanks(0)   Quote tobi Quote  Post ReplyReply Direct Link To This Post Posted: 17 April 2009 at 10:54am
Hi Mark,
 
thanks again ! Iīll try it ... What do you mean with "citated sample" ?
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 17 April 2009 at 11:01am
I use this one ..\Samples\ActiveX\ReportControl\VB\ReportSample with frmTreeView.frm to modify and have now +/- PLUS some other icon.
 
check ActiveX flags for Report:
FocusSubItems EditOnClick ...
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.