Quantcast
Channel: VBForums - CodeBank - Visual Basic 6 and earlier
Viewing all articles
Browse latest Browse all 1448

ucGridPlus

$
0
0
A new UserControl or ocx (for those who want to compile it), as its name implies, is a Grid. Although there are already some Grids and very good by the way, in this case I tried to find a more modern side, I had never used this control so I went based on the different options that are on the web, both those of vb6 (LynxGrid, IGrid, VBFlexGrid) such as those for web use for example ComponentOne and DevExpress. This control took me a long time since there are many lines of code, as always I have not made any help file, but within the examples you will find some very functional examples in real time. Being a control with many options, surely many things have escaped me, which I will be able to add or correct if they let me know, something that I could not do in this grid was to implement the MergedCell functionality (combined cells), but the rest I think is almost everything.

One problem that I found late was that for aesthetic reasons I used another usercontrol "ucScrollBar" as I had already done in the ucList, but I had not noticed that if the project name is changed the ucScrollBar loses the reference and becomes a PictureBox To prevent this from happening, it is necessary to open the ucGridPlus with the notepad and change "Project1" to the name of the project in which it is going to be used, at the moment I did not find a better solution.

The control can load images in many forms and formats both ColImgListAddImage and HeaderImgListAddImage can load the image from array of bits, file, url, base64 url, hbitmap, hIcon and stream; The images can be treated as vectors where we can assign the color according to the forecolor of the cell or we can put common images, it also has a "radius" property to give a circular shape or with rounded tips.

In the first example you will find some graphs, Progress and ranking that are shown in each row, in those examples I used an external module to use a CustomDraw, this with the appropriate knowledge you can do infinite things. It is not part of the grid itself, in this way it is easier to do things according to each one's needs.

In the case of the controls, it is the same, they are not part of the grid, the ucGridPlus is a container, where we can put Combobox, Datepiker among others and with some properties of this we can place said controls on the cell simulating that they are part of she.

The grid has the possibility of adding events to the images and text of the cell, in this way some nice effects can be achieved as you will see in the examples.

It is necessary to have the "Segoe MDL2 Assets" font installed in windows 10, it is already by default, it was used for some icons.

For compiled version (OCX) use the UniTextBox user control to accept unicode characters in edit mode.

To close I want to clarify that this is at the moment something like a beta and until it is not used and errors are found I will not be able to detect them, I know that many things were left in the pipeline but for now I ran out of energy.

Name:  ucGridPlus11.jpg
Views: 153
Size:  38.2 KB
Name:  ucGridPlus3.jpg
Views: 152
Size:  49.4 KB
Name:  ucGridPlus0.jpg
Views: 152
Size:  42.4 KB
Name:  ucGridPlus5.jpg
Views: 153
Size:  34.1 KB

DOWNLOAD USERCONTROL AND EXAMPLES
ucGridPlus.zip

FOR DOWNLOAD COMPILE VERSION(OCX) AND MORE SCREENSHOTS
http://leandroascierto.com/blog/gridplus/
Attached Images
    
Attached Files

Viewing all articles
Browse latest Browse all 1448

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>