Cell merge in DBF Browsing?

This forum is for eXpress++ general support.
Message
Author
Djiber
Posts: 27
Joined: Wed Feb 22, 2012 2:55 am

Cell merge in DBF Browsing?

#1 Post by Djiber »

Is it possible and if it is how to accomplish this:

Image

To explain it a bit more then just a picture even tho picture worth 1000 words :)

ID represent a room in lets say hotel and:
Room 1 is taken from Monday 10 AM till Tuesday 12 (Noon)
Room 2 is taken from Monday 10 PM till Wednesday 10 AM
Room 3 is taken from Tuesday 10 PM till Wednesday 12 (Noon)

So to conclude my question is it possible to merge the fields in Database like that or at least browse them like they are merged.

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Cell merge in DBF Browsing?

#2 Post by rdonnay »

This looks like a difficult task for XbpBrowse, especially the headers.

Have you thought about using the CodeJock calendar?
The eXpress train is coming - and it has more cars.

skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Cell merge in DBF Browsing?

#3 Post by skiman »

Hi,

I'm afraid this will also be difficult with the Codejock Calendar. If there are 20 rooms, or more, in a standard calendar it will be very messy.

I'm using the Codejock Calendar for 2 years now, and it is working very well. But as a real agenda, not as a reservation system. Maybe you can ask this on the Codejock forum.
Screenshots http://www.codejock.com/products/calend ... atform=com

I don't see how to use the calendar as an easy reservation system.
Best regards,

Chris.
www.aboservice.be

User avatar
Auge_Ohr
Posts: 1407
Joined: Wed Feb 24, 2010 3:44 pm

Re: Cell merge in DBF Browsing?

#4 Post by Auge_Ohr »

Djiber wrote:Is it possible and if it is how to accomplish this:
So to conclude my question is it possible to merge the fields in Database like that or at least browse them like they are merged.
i think yes ... but not in a "normal" Calender which work with 24 hour / Day / Week / Month.

Roger and Chris point to Codejock Calender which i have used too.
now i have re-write it in "pure" Xbase++ using same MAPI / DBF Structure with XbpMultiCellGroup() or DXE_ListView()

when create a Appointment you give Start Datetime and Duration which is max 1440 min.

if you Start at 23:58 with 1440min you have to go "over midnight" - > 2Days
if you Start at 00:00 with 1440min it will be a "AllDay" with "Recurrency" = 0 -> 1Day

now if you want to Start Mo. 12:00 - Fr. 12:00 you can not use those Calender Logic

a Browse does have Colume which normal have a :datalink but as you want fill multi Columne in same Row it will be tricky.
but a Calender is "limted" in Size e.g. 7 Day, 1 Month ... so you can use a "fix Grid" -> XbpMultiCellGroup() or DXE_ListView()
Devcon 2012 Timeline
Devcon 2012 Timeline
Devcon_Plan_12Std.JPG (69.54 KiB) Viewed 14265 times
p.s. come to Devcon and get DXE LIB and Information how to use DXE_ListView() in Calender Sample
greetings by OHR
Jimmy

Djiber
Posts: 27
Joined: Wed Feb 22, 2012 2:55 am

Re: Cell merge in DBF Browsing?

#5 Post by Djiber »

rdonnay wrote:This looks like a difficult task for XbpBrowse, especially the headers.
Why is there problem in headers? I draw them like that just to make it easier to understand that Monday is actually 1 Column
skiman wrote:Hi,

I'm afraid this will also be difficult with the Codejock Calendar. If there are 20 rooms, or more, in a standard calendar it will be very messy.

I'm using the Codejock Calendar for 2 years now, and it is working very well. But as a real agenda, not as a reservation system. Maybe you can ask this on the Codejock forum.
Screenshots http://www.codejock.com/products/calend ... atform=com

I don't see how to use the calendar as an easy reservation system.
I'll try to ask there to.

Thanks for the link this looks nice, if it would be possible to make it create appointment that would expand in the same row for the next day it would almost solve my problem and if it would be possible to make 3-4 appointments that start at the same time.
Auge_Ohr wrote:
Djiber wrote:Is it possible and if it is how to accomplish this:
So to conclude my question is it possible to merge the fields in Database like that or at least browse them like they are merged.
i think yes ... but not in a "normal" Calender which work with 24 hour / Day / Week / Month.
Devcon_Plan_12Std.JPG
As I see Calendar is set to display "actions" in the exact time of the day (like it should) and I would need it to be able to "merge" , by that I mean to saw a field or something (Like u see on my picture Field [1,Monday] is 1/4 empty and 3/4 colored but it's 1 field-Those 4 cells actually represent 1 cell/field). So I guess my question: Is it possible to edit or fill just a portion of the field (or to add 1 more dimension so it would be possible to put 2-3 data in the same field and it would be displayed in the same field but 1 beside the other or that 1'st would be Aligned Left and 2'nd Right)
Auge_Ohr wrote: p.s. come to Devcon and get DXE LIB and Information how to use DXE_ListView() in Calender Sample
I Really would but in July last year I finished collage and this will be my 1'st month as a working man with monthly salary around $460 so I can't afford the trip.

User avatar
Tom
Posts: 1171
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Cell merge in DBF Browsing?

#6 Post by Tom »

This should be possible with Ownerdrawing (advanced). However you like the cells to be painted, you can do it. Even the seperators can be in your hands. But. XbpBrowse consists of columns, which are organized (vertically) as cellgroups. The problem is the pointing/highlighting mechanism. You will be able to reflect data for different cells and merge them, you may also show a pointer "hanging over" from one cell to the other, but navigation and datalinks are still organized vertically - cell oriented. This will create lots of problems. It won't work as expected.

A solution is to create an own control, just a static showing data painted with the GRA engine. I'm currently working on something like that. Painting is not the major problem - it is to react on mouse and keyboard events. However, a XbpBrowse is not a good way to do something like that. The Codejock calendar is even worse, since it tends to be very slow, bevhaves strange and has a huge overload of functionality you don't use.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Cell merge in DBF Browsing?

#7 Post by skiman »

Hi Tom,

Yes, the Codejock calendar isn't a solution for this as I said.

However it is a very good agenda. I don't know why you find it slow? And not stable? I can show you my implementation at the Devcon.

I'm interested in your ownerdrawing experience, will you show us some samples at the Devcon?
Best regards,

Chris.
www.aboservice.be

User avatar
Tom
Posts: 1171
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Cell merge in DBF Browsing?

#8 Post by Tom »

Hi, Chris.

It was very slow and unstable when I tried to use it - but that was about two years ago. Maybe, something changed. ;)

I will not show anything at the DevCon - I'm a simple attendee. 8-)
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

Djiber
Posts: 27
Joined: Wed Feb 22, 2012 2:55 am

Re: Cell merge in DBF Browsing?

#9 Post by Djiber »

Tom wrote:This should be possible with Ownerdrawing (advanced). However you like the cells to be painted, you can do it. Even the seperators can be in your hands. But. XbpBrowse consists of columns, which are organized (vertically) as cellgroups. The problem is the pointing/highlighting mechanism. You will be able to reflect data for different cells and merge them, you may also show a pointer "hanging over" from one cell to the other, but navigation and datalinks are still organized vertically - cell oriented. This will create lots of problems. It won't work as expected.

A solution is to create an own control, just a static showing data painted with the GRA engine. I'm currently working on something like that. Painting is not the major problem - it is to react on mouse and keyboard events. However, a XbpBrowse is not a good way to do something like that. The Codejock calendar is even worse, since it tends to be very slow, bevhaves strange and has a huge overload of functionality you don't use.
Could you be more specific about: Ownerdrawing (advanced)?
Cells painted doesn't really mater if they are merged and you can saw or expand them (you can always put a different text color :) ).

I still don't understand do you understand me :P Is it possible to display(tag/color/write something etc.) 2 data/values at the same location(at the same row and column).

DBF can and probably should have multiple columns but how to display those columns as 1? How to remove separators?

User avatar
Tom
Posts: 1171
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Cell merge in DBF Browsing?

#10 Post by Tom »

CustomDrawCell with OWNERDRAW_ADVANCED allows to paint almost everything, including separators and highlighting - it just depends on the data handed to the cell. You don't have access to the database workarea there, but you may transmit complex strings or even converted areas to the cell, and you have access to those data from cells in the neighbourhood. The trick is to create data which allow to be valuated inside CustomDrawCell - it may be something completely different shown there!

So, if your column datalink creates something like a string or array (handed as a string) which enables you to find out what to be painted in CustomDrawCell, you are able to paint something like shown in your sample. This should not be very complicated - the trick is to assemble the data needed inside the drawing method. The datalink may create something like this for tuesday, first line:

"{'22.00pm','06.00am','green'}"

Inside the drawing routine, this string is converted back to an array. You find out that '22.00pm' can't be on the same day (just a sample), so beginning time for tuesday is acutally '00.00am', but this 'data' hangs over to monday, so you don't paint a seperator. '06.00am' is 25 percent of the day coverage, so you paint a GRA box filling 25 percent of the cell (from left). And so on. CustomDrawCell has an array as a parameter which helps to find out where to paint. You have other cell functions available there to find out the real presentation space size and everything else. So, the major issue is just: to paint.

You can even do this with DCBROWSE very simply. Just create a subclass and do the cell painting there, everything else is managed by DCBROWSE.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

Post Reply