Page 1 of 2

Another ExplorerBarGadget [Update]

Posted: Thu Jul 27, 2006 1:48 pm
by wayne-c
Hi all,

Scroll down for the Update

the ExplorerBarGadget seems to be very popular, and I could not resist and quickly hacked together a version by myself.

Image

For easy use the ExplorerBarGadget is coded in a PureBasic-Include file called ExplorerBarGadget.pbi. I'm sorry for the bad programming style in ExplorerBarGadget.pbi, but as mentioned above I hacked this together very quickly. Take it as a black box and have fun :-)

There's one thing still missing: the ScrollBar. My attempt (see ExplorerBarGadget_DoScrollBar() inside ExplorerBarGadget.pbi) failed. If you can get it running -> Great! Post it here... 8) *** SOLVED in latest version ***

In the Zip-File you will find all sources and required images. *** EDIT: Scroll down for the new version ***.

Bye,
Wayne-C

Posted: Thu Jul 27, 2006 2:03 pm
by srod
Very nice. :D

About the scrolling, did you not originally use a scroll area gadget?

**EDIT - sorry, confusing your work with lucky luke's!

A closer look at the code, this is very good indeed. Well done.

Posted: Thu Jul 27, 2006 2:04 pm
by yoxola
This is GREAT, and the look is the same in my Win2K.

Works good, thanks for sharing :D

Posted: Thu Jul 27, 2006 2:24 pm
by wayne-c
srod wrote:A closer look at the code, this is very good indeed. Well done.
Thank you!
This is especially good to hear from you (you saved my life many many times in this forum, direct or indirect) :D
srod wrote:A closer look at the code
but don't go too deep, or you will find out about the "y + 10, yy + 15, y + yy + 10 + 5"-stuff that even I do not understand anymore by today (and this is only 1 day after I did code it) :lol:

Posted: Thu Jul 27, 2006 2:32 pm
by srod
...-stuff that even I do not understand anymore by today (and this is only 1 day after I did code it)
Then get some comments in there! :lol:

Posted: Thu Jul 27, 2006 2:34 pm
by ts-soft
Very nice, but some Redraw problems (XP SP2 GeForce 4)

Posted: Thu Jul 27, 2006 2:34 pm
by KarLKoX
Image

Posted: Thu Jul 27, 2006 2:45 pm
by wayne-c
ts-soft wrote:Very nice, but some Redraw problems (XP SP2 GeForce 4)
What kind of? Can you give more details please?
And: Let's eliminate them! (You, me, anybody else: this is open source! :wink: )

Posted: Thu Jul 27, 2006 2:48 pm
by wayne-c
srod wrote:
...-stuff that even I do not understand anymore by today (and this is only 1 day after I did code it)
Then get some comments in there! :lol:
Ok here's the deal:
Help me with the ScrollBar stuff, and I'll put as many comments in there to make it a useable Include file for all PB users in the world :D

Posted: Thu Jul 27, 2006 3:15 pm
by srod
No deal! :) It's your baby!

Have you tried a scroll area gadget? One way of avoiding the scroll messages etc.

Posted: Thu Jul 27, 2006 3:16 pm
by ts-soft
wayne-c wrote:What kind of? Can you give more details please?
And: Let's eliminate them! (You, me, anybody else: this is open source! :wink: )
It seems me it's a memoryleak. I cann't make a snapshot before close the
exe :oops:

Posted: Thu Jul 27, 2006 3:34 pm
by gnozal
Very nice !
No problems here with NT4 :wink:

Posted: Thu Jul 27, 2006 5:31 pm
by wayne-c
srod wrote:Have you tried a scroll area gadget?
I will have a look at this tonight.

Originally I wanted to use the scrollbars that every window class has got - I did this with VisualBasic's PictureBox many times, but somehow the ImageGadget in PureBasic always "overpaints" the bar: try un-commenting the ExplorerBarGadget_DoScrollBar() procedure and call it when #WM_SIZE occurs in ExplorerBarGadget.pbi. When you resize the image, the scrollbar shows for a very (!) small time, but immediately gets painted over by the image the gadget contains.

Bye,
Wayne-C

Posted: Fri Jul 28, 2006 3:47 pm
by wayne-c
Status Update:

I have completed the ScrollBar work; also the dynamic resize of the Group-Boxes when there is the vertical ScrollBar. I am gonna add some features I need for my Project (Big Details-Thumbnail, Static Texts, Custom Colors) and then gonna re-upload the Source.

For those who can't wait till then:

Demo.pb

Code: Select all

*** Code Removed ***
ExplorerBarGadget.pbi

Code: Select all

*** Code Removed ***
Download Zip-File instead: ExplorerBarGadget.zip

Wayne-C

Posted: Fri Jul 28, 2006 4:10 pm
by oridan
Error in ExplorerBarGadget.pbi
Line 107: Syntax error!

Code: Select all

If *qrc\Right <8> 0
:cry: