Multiline Folders

Multiline Folders

Postby CharlesPratt » Tue May 01, 2007 7:29 pm

Antonio -
I have been able to get very nice multiline folders from resources with only some minor changes to Tfolder and by adding a function called TabGetRowcount() to tabctrl.c that I got from Rossine's modified sample file. No changes are needed in the redefine class, as the style is controled by the resources. All you need to do is to add "TCS_MULTILINE" to the style in the .RC file and windows does it automatically.

The only problen I have with this is when I use the RESIZE16 clause. When I do this, none of the controls on the first folder page appear. Clicking on the tab does bring the controls. Or, if I call one of the pages on the second row by setting the option to 5 on INIT, for example, the dialog[5] appears on the front row with all of it's controls. Any of the rear pages appear on the front with controls, and none of the first row pages that are called by the option method appear with their controls.

I've looked at dialog.prg where the initiate method does the resize16 work, but I wouldn't know where to start to fix it. If anybody has any ideas on this I would like to hear them.

Regards,
Charles
Charles Pratt
CharlesPratt
 
Posts: 38
Joined: Tue Jan 09, 2007 2:31 am
Location: Winston-Salem, NC

Postby Antonio Linares » Wed May 02, 2007 7:12 am

Charles,

Could you provide us a small and self contained sample ? Thanks,
regards, saludos

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

Postby CharlesPratt » Thu May 03, 2007 4:47 pm

Antonio -
I sent an e-mail to you with a zip file (multfld.zip) attached that contained folder.prg (tfolder modified), tabctrl.c modified, foldonly.prg, and foldonly.rc. I wasn't sure how to upload it to this forum.

Regards,
Charles
Charles Pratt
CharlesPratt
 
Posts: 38
Joined: Tue Jan 09, 2007 2:31 am
Location: Winston-Salem, NC

Postby CharlesPratt » Tue May 08, 2007 12:38 pm

We've still not been able to fix the problem of the controls not showing on the first tab of the multiline folders when RESIZE16 is used. Below is a web address to download a sample with the supporting files.

Problem is solved! See my post below for a sample.
Charles
Last edited by CharlesPratt on Thu May 10, 2007 1:12 pm, edited 3 times in total.
Charles Pratt
CharlesPratt
 
Posts: 38
Joined: Tue Jan 09, 2007 2:31 am
Location: Winston-Salem, NC

Postby StefanHaupt » Wed May 09, 2007 7:44 am

Charles,

the link gives an error 404-object not found
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Postby CharlesPratt » Wed May 09, 2007 12:58 pm

Sorry about that, Stefan. I just edited the link to show the correct file name.

Charles
Charles Pratt
CharlesPratt
 
Posts: 38
Joined: Tue Jan 09, 2007 2:31 am
Location: Winston-Salem, NC

Postby CharlesPratt » Thu May 10, 2007 1:27 pm

To everybody who is following this thread -

I have solved the problem with a simple fix. The modified tabctrl.c is no longer needed, and only one line of code needs to be added to folder.prg. To have very nice multiline folders from resources:

1. Add TCS_MULTILINE to the Style in your RC file.
2. Add ::AdjustRect() to the Initiate() method of Tfolder
3. If you use the RESIZE16 Clause, you will need to say:
ON INIT oFld:AdjustRect() in your prg code.
A working example link is below:

www.softraksystems.com/download/MULTFOLD.ZIP

Best regards,
Charles
Charles Pratt
CharlesPratt
 
Posts: 38
Joined: Tue Jan 09, 2007 2:31 am
Location: Winston-Salem, NC

Postby Antonio Linares » Thu May 10, 2007 1:43 pm

Charles,

Excellent, and thanks for sharing the solution with us :-)
regards, saludos

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

Postby Ugo » Fri May 11, 2007 1:53 pm

CharlesPratt wrote:To everybody who is following this thread -

I have solved the problem with a simple fix. The modified tabctrl.c is no longer needed, and only one line of code needs to be added to folder.prg. To have very nice multiline folders from resources:

1. Add TCS_MULTILINE to the Style in your RC file.
2. Add ::AdjustRect() to the Initiate() method of Tfolder
3. If you use the RESIZE16 Clause, you will need to say:
ON INIT oFld:AdjustRect() in your prg code.
A working example link is below:

www.softraksystems.com/download/MULTFOLD.ZIP


Charles,

can I test your news?
i compile and found an error at runtime:
Code: Select all  Expand view
   Descrizione: Error BASE/1004  Message not found: TCLIPGET:TYPE

Stack Calls
===========
   Called from: tobject.prg => TCLIPGET:ERROR(172)
   Called from: tobject.prg => TCLIPGET:MSGNOTFOUND(205)
   Called from: tobject.prg => TCLIPGET:TYPE(0)
   Called from: tget.prg => TCLIPGET:PARSEPICT(367)
   Called from: tget.prg => TCLIPGET:SETPICTURE(2043)
   Called from: tget.prg => (b)GET:GET(122)
   Called from: TCLIPGET.prg => TCLIPGET:TCLIPGET(0)
   Called from: tget.prg => TCLIPGET:NEW(234)
   Called from: TCLIPGET.prg => GETNEW(23)
   Called from: TGET.prg => TGET:REDEFINE(361)
   Called from: FOLDONLY.PRG => SNGLFOLD(86)
   Called from: FOLDONLY.PRG => (b)BUILDMENU(34)
   Called from: MENU.prg => TMENU:COMMAND(407)
   Called from: WINDOW.prg => TWINDOW:COMMAND(937)
   Called from:  => TWINDOW:HANDLEEVENT(0)
   Called from: WINDOW.prg => _FWH(3177)
   Called from:  => WINRUN(0)
   Called from: WINDOW.prg => TWINDOW:ACTIVATE(886)
   Called from: FOLDONLY.PRG => MAIN(24)

can you help me?
Ciao, best regards,
Ugo
User avatar
Ugo
 
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Postby Antonio Linares » Fri May 11, 2007 4:02 pm

Ugo,

You can't use Harbour from CVS as Class TGet has been modified and now it does not work fine with FWH.

Please use Harbour from www.fivetechsoft.com/files/harbour.exe
regards, saludos

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

Postby Ugo » Fri May 11, 2007 4:40 pm

Antonio Linares wrote:You can't use Harbour from CVS as Class TGet has been modified and now it does not work fine with FWH.

Please use Harbour from www.fivetechsoft.com/files/harbour.exe


I use xHarbour, do not work with this?
Ciao, best regards,
Ugo
User avatar
Ugo
 
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Postby Antonio Linares » Fri May 11, 2007 5:04 pm

Ugo,

Are you using the most recent xHarbour from the CVS ?
regards, saludos

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

Postby Ugo » Fri May 11, 2007 5:37 pm

Antonio Linares wrote:Are you using the most recent xHarbour from the CVS ?

Antonio,

i download from CVS today.
Ciao, best regards,
Ugo
User avatar
Ugo
 
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Postby Ugo » Fri May 11, 2007 5:41 pm

Antonio,
I do not receive the replies:

Code: Select all  Expand view
Always notify me of replies:
Sends an e-mail when someone replies to a topic you have posted in. This can be changed whenever you post.


in my profile is set to YES!
Ciao, best regards,
Ugo
User avatar
Ugo
 
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Postby Raymundo Islas M. » Tue May 15, 2007 12:50 am

Antonio :

Can you tell me how to apply these changes into my apps ??

Thanks a lot


Saludos
FWH 10.6 + xHarbour + Borland 582
User avatar
Raymundo Islas M.
 
Posts: 592
Joined: Tue Mar 14, 2006 11:34 pm
Location: Acapulco, Gro. MEXICO

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Marc Venken, nageswaragunupudi and 67 guests