Page 1 of 2

This is a browse

Posted: Mon Dec 20, 2010 11:45 am
by Tom
I'm working with ownerdrawing and XbpBrowses (DCBROWSES, to be honest) for quite a while now. This is rather simple, since DCBROWSE provides the "subclass" clause, and a new XbpBrowse-class with ownerdrawing features can be simply derived from DC_XbpBrowse, so all features of DCBROWSE are still supported. The code remains almost the same, only the subclass clause is added once. The subclass must have it's own init-method, where ownerdrawing is actived (for the dataareas). The music plays at "CustomDrawCell()". You can do almost everything there! The hardest thing is to provide the data needed for cell-painting. Since the painting itself runs in a different thread, it's not so easy to access the database or the array of the browse. My solution: The browse browses 3-dim-arrays. Every cell is an one-dim-array with all information needed. To avoid conflicts, DCBROWSECOL is done this way:

DCBROWSECOL DATA {||Var2Char(DC_GetColArray(n,oBrowse))} ...

Inside CustomDrawCell, the array is rebuilt using the makro expander.

This is a sample. It shows various data, can be resized (more dates for a day). All symbols can be set via get/set-functions. I struggled around with the codejock calendar, but this is much simpler. It's only one of several samples. I built a bitmap/icon browser, a mail client, multiline browses with lots of colours and icons, and, and, and ...
kalender.jpg
kalender.jpg (115.35 KiB) Viewed 17151 times

Re: This is a browse

Posted: Mon Dec 20, 2010 11:59 am
by rdonnay
That is SOOOOOOOOOOOOOO Cool! :banana-dance: :banana-angel: :banana-blonde: :banana-dreads: :banana-guitar: :banana-jumprope: :banana-ninja: :banana-rainbow: :banana-skier: :banana-rock:

I would sure like to see a complete demo of your application.
Hopefully, we can all get together again for another Devcon.

You inspire us all!!!

Re: This is a browse

Posted: Mon Dec 20, 2010 12:08 pm
by sdenjupol148
Awesome!
I love it :clap: :dance: :handgestures-salute: :greetings-clapyellow: :happy-jumpeveryone: :happy-wavemulticolor: :happy-partydance:

Re: This is a browse

Posted: Mon Dec 20, 2010 12:26 pm
by Tom
Thanks, guys. :)

I'd love to show some stuff I created at the next ExpDevCon. We are currently working on a kind of demo. I will give it to you, Roger, as soon as it's finished.

Re: This is a browse

Posted: Mon Dec 20, 2010 2:18 pm
by bwolfsohn
ok.. who let the emoticons out for the holidays :naughty: ??

P.S. very cool...

This also brings up a question i asked a couple of weeks ago and get NO response to:

Has anyone done any integration with xbase++ and google calendars ?? Seems like a natural value-added fit for a vertical market app like many of ours (and yours!!)

Re: This is a browse

Posted: Tue Dec 21, 2010 4:10 am
by skiman
Tom,

This looks as you found the way to use the owner drawing as it should be. Congratulations with it.

As you maybe know I'm using the codejock calendar, but the main advantage of yours is that you have control of everything. You also don't need to install the Codejock controls. You can add the features you like the way you want to do it. Which makes it a lot better.

Brian, it looks as the 'Google Calendar Data API' should be the way to follow to synchronize with a Google Calendar. It seems rather straight forward to add and delete events. I'm sure it could be done to have some simple functions to add/delete/modify a calendar event. It is something on my wishlist.

Re: This is a browse

Posted: Tue Dec 21, 2010 5:45 am
by Tom
Hi, Chris.

I do use CodeJock intensively (Docking Panes, Task Dialoges, Buttons, Skins, Command Bars, Systray, Popups a.s.o.), but I found the CJ-calendar is oversized and not very handy to use. Data integration is much too complicated. My calendar can be used in four formats (month, year, quarter, week - same class, same CustomDrawCell()!), has a context menu with various functions. Data manipulation is achieved via double click. I'm working on a method to match the position where the user clicked with the cell data, so a special date (or holidays or birthdays ...) can be changed directely. This is consistent to what I do/provide elsewhere in my app, data access is based on the same standard.

Re: This is a browse

Posted: Tue Dec 21, 2010 6:28 am
by skiman
Tom,

I'm using a few cj-controls in my application, the shortcutbar and calendar are the most important. I'm planning to add a few more.

Up to now I didn't find for what the docking panes could be usefull. What is the purpose of them in your application?

Are you using a simple command bar, or have you implemented a ribbon bar?

Re: This is a browse

Posted: Tue Dec 21, 2010 8:49 am
by Tom
Hi, Chris.
Up to now I didn't find for what the docking panes could be usefull. What is the purpose of them in your application?
We have a three-element-docking-pane on the main menu area of our major app (app is MDI, but all modules open in new windows). The panes contain "sticky notes", a scheduler and the calendar for the user. They can be floated, mini-/maximized, resized and placed outside the app as indpendent windows. The app stores all information about the panes and restores them at start. To be honest, I'm not very happy with the panes. Im currently working on something based on the improved tabpages (from the new "XbPacks"), where a "minimize"-button reduces all tabs to the area containing the caption, and a click there maximizes them again. This is not as much as the docking panes are able to do, but it's enough for our users.
Are you using a simple command bar, or have you implemented a ribbon bar?
A ribbon bar, but we only use this in a very powerful maintenance app (data replication, scheduled reindexing, scheduled automated reports and so on), outside our major app.

Re: This is a browse

Posted: Wed Dec 22, 2010 12:27 am
by skiman
Hi,

Yes, the new tabpages are looking good.

Roger, do you have plans to add this functionality to the dctabpages?