Listbox Headings Win32 Style

Postby James Bott » Sun Feb 12, 2006 9:10 am

Dale,

You are right. If the database being viewed with the browse is indexed the records would change anyway BUT is it not possible to have the records to change but the highlight bar to stay in its current position until the user moves it? It becomes disconcerting when the record highlight bar is half way down the screen lets say, you add a new record, and because of my long winded code to keep the scroll bar in synch the listbox gets repainted (what appears to be multiple times) and the record highlight bar (scroll bar jumps) to the first line of the browse (although the scroll bar is in synch).


Yes it is possible, but may be complicated. First you have to consider all the possible senarios. If you are suggesting that the new record be under the highlight, consider this possibility. If the first record on the screen is the first record in the file, and the new record falls between the first record and the location of the highlight, then you must either move the highlight for it to be over the new record, or not move it, and it won't be over the new record. You also have to have some way to communicaate to the browse that you have added a new record to the underlying databae. So, it is not be as easy as it may at first seem.

Contrary to your experience, I do see problems with deleted records. When you think about it, it makes sense that you would. When the browse is first initialized, the scrollbar is too--with the range and current position of the highlighted record. If you then go behind the browse and change the number of records by either adding or deleting records, the scrollbar's range and current record will then be out of synch. So we need to update the scrollbar.

I have a working modification to TWBrowse that I think will fix this. Preliminary testing shows it working, but I need to do some more testing before I publish it. I will be travelling for the next few days so you may not hear from me until after I am back.

Regarding the headers, you may be interested to note that the new Office 12 applications like Excel and Access do not use the standard windows headers that you are looking for. They use flat headers with a gradient color (also called degraded color). I would prefer to see this capability than the standard headers. I know that you are not interested in using Hernan's TSBrowse, but for others who are reading this, TSBrowse can do this style of header.

I, like you, would like to have the line height settable.

I'm glad the line types are working for you. Did you try coloring the highlight bar yet?

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Enrico Maria Giordano » Sun Feb 12, 2006 9:26 am

James Bott wrote:Hernan's TSBrowse


Hernan's TWBrowse (unhappy choice of the name). TSBrowse is of Manuel Mercado.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby dpaterso » Sun Feb 12, 2006 10:57 am

Hello again,

Contrary to your experience, I do see problems with deleted records. When you think about it, it makes sense that you would. When the browse is first initialized, the scrollbar is too--with the range and current position of the highlighted record. If you then go behind the browse and change the number of records by either adding or deleting records, the scrollbar's range and current record will then be out of synch. So we need to update the scrollbar.


When I delete my records (trapping for the Del key) I am only flagging them for deletion and displaying them in another color and my indexes do not include !Deleted() so that is probably why I do NOT have issues with deleted records (I only permanently remove or pack my databases if a sort of SUPERVISOR or ADMIN user ensures that everybody is out of the network and specifically selects a PACK option from a SYSTEM menu this done because you would be surprised at how many users will accept YES - I AM SURE THAT I WANT TO DELETE THIS RECORD - 10 TIMES and delete the record when they really did not want to delete the record in the first place!!! Most of our users really need time to think about things and therefore need the facility to change their minds!!!).

Regarding the headers, you may be interested to note that the new Office 12 applications like Excel and Access do not use the standard windows headers that you are looking for. They use flat headers with a gradient color (also called degraded color). I would prefer to see this capability than the standard headers. I know that you are not interested in using Hernan's TSBrowse, but for others who are reading this, TSBrowse can do this style of header.


I would not mind a flat header but the reason that I was thinking that it would be nice to have Win32 Headers is that you could have your database indexed on all of the displayed fields (using tags) and by just clicking on the header you could change the display order of the browse (this does work already for me) but the header that was highlighted would denote which field is currently being used to sort the displayed browse.

Not to mention the fact that having EITHER Win32 Headers or the flat degraded header that you mention OR BOTH would at least CONFORM to SOMETHING and look very polished.

Regards,

Dale.
dpaterso
 
Posts: 142
Joined: Tue Jan 24, 2006 9:45 am
Location: South Africa

Postby Silvio » Mon Feb 13, 2006 9:17 am

DEAR TO ALL

I THINK TO GO OUT OF THE TOPIC
THE ARGUMENT OF THIS TOPIC IS " LISTBOX HEADER 32 bit "
I think we can write about it ........

buit it is not important ... there many other things need on Fivewin

Antonio not have time to lose on it ....

1) We can USe Inno setup of Delphi to install and we cannot use Fivewin program and there is not a INNOSETUP created with Fivewin...

2 We must use ER or EP but there is not a designer create on fivewin , I want a func or class to insert into a programm but We must use another program

3) We not have a OCR CLASS


4) we not have a design form we can use Peele C or Workshop of borland or another program

5 )we have not....
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby dpaterso » Mon Feb 13, 2006 12:41 pm

No offence but why did you not start your own thread?

This topic goes toward the overall appearance and functioning of TWBROWSE and I thought that this was important.

If you are not worried what your user interface looks like then use InnoSetup. What do you need a FiveWin Installer for anyway? I use InnoSetup and have not found anything that it can't do.

Also remember that even if there was a FiveWin Resource Compiler it would still use TWBROWSE so at this point it does not matter what RC you use.

And by the way - Antonio has not responded to any of the messages in this thread so I have my doubts as to whether or not he is wasting any time on this.

Regards,

Dale.
dpaterso
 
Posts: 142
Joined: Tue Jan 24, 2006 9:45 am
Location: South Africa

Postby Silvio » Mon Feb 13, 2006 2:06 pm

I asked to antonio for " headers listbox 32bit" and he responce to me he not have time to create it .....
Do you want see the email original message ?

go to http://fivetechsoft.com/forums/viewtopi ... =6352#6352

and then when You write one thing connects the brain...

it you want use Inno setup OK but it not created with fivewin If I must use a delphi program I go to Delphi for all me applications
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Antonio Linares » Mon Feb 13, 2006 10:36 pm

Dale,

>
And by the way - Antonio has not responded to any of the messages in this thread so I have my doubts as to whether or not he is wasting any time on this.
>

We have been very busy finishing events support for activex.

Win32 headers for listboxes its on our to-do list. We can not say when, but we will provide them.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby dpaterso » Tue Feb 14, 2006 6:20 am

Thanks Antonio, that is all I needed to know.

Please do take into account some of the ideas express in this message thread when you get around to working on the listbox code.

(Other than the listbox problems - FWH / xHB - is the best)!

Thanks again,

Dale.
dpaterso
 
Posts: 142
Joined: Tue Jan 24, 2006 9:45 am
Location: South Africa

Postby James Bott » Tue Feb 14, 2006 6:17 pm

Dale,

I would not mind a flat header but the reason that I was thinking that it would be nice to have Win32 Headers is that you could have your database indexed on all of the displayed fields (using tags) and by just clicking on the header you could change the display order of the browse (this does work already for me) but the header that was highlighted would denote which field is currently being used to sort the displayed browse.


There are two ways to do this now. The first way I did it was to have two headers (text) for each sortable column. When the user clicks on the column, the next index is used and the new text for the header is also used. I just used the same text with a trailing asterisk (not very sophisticated but it did the job).

You can also achive a better look by creating the header text as a graphic (bmp). That way you can have one with text only and one with text and a down arrow, or colored underline, or whatever you like.

Below are some clips of an example.

James

Code: Select all  Expand view
     ::setHeaders(oLbx)

     oLbx:aActions:={;
       {|| .t.},;
       {||::setOrder(1),oLbx:gotop(),::setHeaders(oLbx),oLbx:refresh()}, ;
       {||::setOrder(2),oLbx:gotop(),::setHeaders(oLbx),oLbx:refresh()}, ;
       {|| .t.},;
       {|| .t.},;
       {|| .t.},;
       {|| .t.},;
       {|| .t.},;
       {|| .t.};
       }

...

// Show which browse column is sorted
method setHeaders(oLbx)
   oLbx:aHeaders:={" ",;
       if(::indexOrder()=1,::aHeaders[2]+"*",::aHeaders[2]), ;
       if(::indexOrder()=2,::aHeaders[3]+"*",::aHeaders[3]), ;
       "Cost","Pack","UOM","OnHand","OnOrder","Notes" }
return nil
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby James Bott » Tue Feb 14, 2006 6:23 pm

Enrico,

Hernan's TWBrowse (unhappy choice of the name). TSBrowse is of Manuel Mercado.


Whoops. My mistake. Thank you for pointing that out. TSBrowse is the one I meant.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 91 guests

cron