|
-
Apr 11th, 2013, 09:08 AM
#1
Thread Starter
Junior Member
simular control like listview WITH multiline text and object support of each subitem
Hallo,
does anybody can help me finding a custom control which has the features like listview control but with full support of wrapped lines (line breaks) - not only at 'view' 0 and 1 (Icon and SmallIcon) but also at view 2 and 3 (list and report) and at each subitem.
Furtheron it would be great if each of its subitems support objects (e.g. pictures, progress bar, rating stars, etc.) and tooltiptext at any view just like here: http://www.codeproject.com/Articles/...o-Use-ListView .
It would be perfect if it even would have the same object model so that it could easily be exchanged with standard listview code.
Does anybody know any custom control like that? The wrap feature is the most important.
It is really a mess that a control like that is not standard of Visual Basic cause it is so OFTEN needed to realise a powerful and well looking database application...
It would not matter that much if it is not free.
Would be great to find help here.
Best wishes.
Last edited by Softterrier; Apr 11th, 2013 at 09:40 AM.
-
Apr 11th, 2013, 09:15 AM
#2
Fanatic Member
Re: simular control like listview WITH multiline text and object support of each subi
 Originally Posted by Softterrier
Hallo,
does anybody can help me finding a custom control which has the features like listview control but with support of wrapped lines - not only at 'view' 0 and 1 (Icon and SmallIcon) but also 2 and 3 (list and report).
Furtheron it would be great if its subitems support objects (e.g. pictures, progress bar, rating stars, etc.) just like here: http://www.codeproject.com/Articles/...o-Use-ListView .
It would be perfect if it even would have the same object model so that it could easily be exchanged with standard listview code.
Does anybody know any custom control like that? (I suppose that for this one lots of programmers are looking for.)
Would be great to get help.
Best wishes.
by sure there are somes, but that is much work, by sure it is not available for free. Ppl. like to share simple things, but not very large nice looking and fully functional modules.
the more close to it that I did once, is a fuly skinable forum viewer, it has two modes, navigation in forum directories tree, and browsing forum theads. With some methods you feeds in the forum data it accepts forums tags like [IMG][/IMG] so if posts has media tags it downloads from internet and shows it. Basically what a webserver does in PHP, it does in VB6, it parses ALL, text, tags, users Avatars, iconic properties powers, editor boxes, account management, all taking in account all skin scripts/images.png loaded for skin. And that was like 3 whole months of hard work to do it, test it, debug it, create a default skin, place it in a nice VB6 form, create a communication protocol to feed/send information from a main server using a winsock. (well I reused a existing protocol to encapsulate packets for the forum protocol "PiP").
But that listView that you want, has more work and more ARTWork, by sure a 6month to 1 year, depends on the programmer's free time.
Last edited by flyguille; Apr 11th, 2013 at 09:26 AM.
-
Apr 11th, 2013, 09:20 AM
#3
Thread Starter
Junior Member
Re: simular control like listview WITH multiline text and object support of each subi
so what is your suggestion, Flyguille?
Just send me the link or name.
I could not find any...
Thank you so much!
Last edited by Softterrier; Apr 11th, 2013 at 09:26 AM.
-
Apr 11th, 2013, 09:28 AM
#4
Fanatic Member
Re: simular control like listview WITH multiline text and object support of each subi
 Originally Posted by Softterrier
so what is your suggestion, Flyguille?
Just send me the link or name.
I could not find any...
Thank you so much!
Learn to be confortable to create your own UserControl, it is not hard, it requires a lot of pre-planification.
I will give you some TIPS.
when you draw in the usercontrol surface you can use negative XY coordinates, or to be more far than the object size, the usercontrol object will CLIP anything drawed outside.
So you can to do simples formulas to emulate the SCROLL, by example.
Every object will have an absolute ObjectStartX ObjectStartY and ObjectWidth ObjectHeight
You must draw object that falls only in the scope of the viewable box.
By example:
ScrollViewStartY = Actual Vertical Scroll Position
usercontrol.height = the size of your viewable windows.
so, when looking what to render.
Code:
dim VYS as long, VYE as long, I as long
VYS=ScrollViewStartY
VYE = ScrollViewStartY+usercontrol.height-1
for i =0 to LastObjectInUse
if objectstarty(i)+objectheight(i)<VYS then
' the object is far avobe hidden, don't render.
else
if objectstarty(i)>VYE then
' the object is far down hidden, don't render.
else
' Some part of the object is shown, RENDER.
' Do de same checks for hidden LEFT or hidden RIGHT (horizontal scroll).
....
Call RenderObject (ObjextStartX(i)-ScrollViewStartX,ObjextStartY(i)-ScrollViewStartY)
.....
endif
endif
next I
...
Private Sub RenderObject( byval SX as long, byval SY as long)
' Where SX and SY are the drawable UserControl coordinates of the LEFT UPPPER PIXEL location for your object.
so , from the point of view of the user, you has a complete 1pixel scrolleable scrollbars, and all runs nicely and fast.
Is easy like that.
It requires a lot of planification, enumerate all object classes that you will needs, and invent then.
declare the classes structures with all the properties it will needs (font, colors, shapes, images, subojects, custom properties, anything needed to draw the object), the VB way is to do collections of them, and handle the collections (but I didn't it, I just used arrays :P old school stuff).
The more problematic was , to know the SIZE needed for a text box, when you want to be it as big as the text needed (tipical in a forum post, the post is big as the text inside). Why?, because you needs to render first the BOX/POST/LABEL background, and then its TEXT ON it.
So, you needs to duplicate the text parse/render execution, one time for calculating how much space it will needs, then, render the needed background and then reexecute for real doing it.
Last edited by flyguille; Apr 11th, 2013 at 09:57 AM.
-
Apr 11th, 2013, 10:05 AM
#5
Re: simular control like listview WITH multiline text and object support of each subi
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|