[Plz Linares] How to change the color of a disabled folder?

[Plz Linares] How to change the color of a disabled folder?

Postby sambomb » Mon May 11, 2009 6:21 pm

I'm looking for a way to change the color of a disabled folder, I have found a folder modifyed by Ricardo Marques, but implement this class will give me a lot of troubles because I have many different programs and I ain't the only one that modify the code, so I must use something simpler.

There is the link to the class:
http://www.centralxbase.com.br/download ... folder.zip

Can anyone tell me how I can just change the color of a folder when I disable it?

Linares, can you implement it in the next version? :D
Email: SamirSSabreu@gmail.com
MSN: SamirAbreu@hotmail.com
Skype: SamirAbreu
xHarbour 1.1.0 + FwXh 8.02
xHarbour 1.2.1 + Fwhh 10.6
User avatar
sambomb
 
Posts: 385
Joined: Mon Oct 13, 2008 11:26 am
Location: Itaocara - RJ - Brasil

Re: [Plz Linares] How to change the color of a disabled folder?

Postby Euclides » Wed May 13, 2009 4:41 pm

sambomb,
In the Patrick´site (fivewin.info) there is VFOLDER (vagner´s).
It is simple to maintain and does the work.
I use it wit xHarbour and in a old system (Fivewin 2.0)
Give it a try
Regards, Euclides
User avatar
Euclides
 
Posts: 154
Joined: Wed Mar 28, 2007 1:19 pm

Re: [Plz Linares] How to change the color of a disabled folder?

Postby sambomb » Wed May 13, 2009 8:27 pm

Hi Euclides, thx for reply.
I don't want to use a new class because it'll give me a lot of troubles...
Actually I have a configuration screen with more than 2 thousands lines of code (only to definition and related comment's) and I will need to modify the code here... It is not my code only, so I can't simple change to other class...

I don't remember any other class that don't have a visual effect to show if the object is enabled or not...

I figure out that it can be changed to help many other programmer's, for example in the brazilian community of fivewin a lot of people need this change...


(traduzindo para o português) Euclides, se não estou enganado você é do brasil então la vai.
Eu não quero usar uma nova classe pois isso iria me gerar um monte de problemas.
Tenho uma tela de configuração que tem cerca de 2000 linhas de código apenas nas definições e comentários relacionados e vou precisar modificar o código aqui... Outro problema é que o código não é meu então não posso simplesmente mudar a classe....

Não me recordo de nenhuma outra classe que não tenha um efeito visual para identificar se está habilitado ou não...

Eu imagino que isso possa ser alterado para ajudar vários outros programadores, na comunidade brasileira de fivewin tem várias pessoas que precisam dessa correção...
Email: SamirSSabreu@gmail.com
MSN: SamirAbreu@hotmail.com
Skype: SamirAbreu
xHarbour 1.1.0 + FwXh 8.02
xHarbour 1.2.1 + Fwhh 10.6
User avatar
sambomb
 
Posts: 385
Joined: Mon Oct 13, 2008 11:26 am
Location: Itaocara - RJ - Brasil

Re: [Plz Linares] How to change the color of a disabled folder?

Postby sambomb » Fri May 15, 2009 2:44 pm

Nobody can give me a help?
Email: SamirSSabreu@gmail.com
MSN: SamirAbreu@hotmail.com
Skype: SamirAbreu
xHarbour 1.1.0 + FwXh 8.02
xHarbour 1.2.1 + Fwhh 10.6
User avatar
sambomb
 
Posts: 385
Joined: Mon Oct 13, 2008 11:26 am
Location: Itaocara - RJ - Brasil

Re: [Plz Linares] How to change the color of a disabled folder?

Postby Antonio Linares » Fri May 15, 2009 6:50 pm

Sambomb,

As far as we know there is no way to paint in a different way a disabled tab of a folder. If you use bitmaps in your folder, then you can paint a different bitmap for it. Please review FWH\samples\TestFold.prg to see how to use bitmaps for each folder tab.

Anyhow we are going to review the file that you have provided us to see if there is a way, thanks

Edited: We have reviewed the file and he is not using a standard Windows folder (SysTabControl32).
regards, saludos

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

Re: [Plz Linares] How to change the color of a disabled folder?

Postby sambomb » Fri May 15, 2009 7:52 pm

Thank's Linares!

I still need this feature but I can handle the trouble with the bitmaps like you said.
Email: SamirSSabreu@gmail.com
MSN: SamirAbreu@hotmail.com
Skype: SamirAbreu
xHarbour 1.1.0 + FwXh 8.02
xHarbour 1.2.1 + Fwhh 10.6
User avatar
sambomb
 
Posts: 385
Joined: Mon Oct 13, 2008 11:26 am
Location: Itaocara - RJ - Brasil

Re: [Plz Linares] How to change the color of a disabled folder?

Postby Dietmar Jahnel » Fri May 15, 2009 8:42 pm

I also could use more features in folders
I tried the class TRFolder from the link above: it provides many features like a lot of different tabs, colors and fonts and the sample code looks nice.
But the trouble is there: it seems that you cannot put these folders in dialogs only in windows...
Therefore I cannot use it.

So its up to FWH!
Dietmar
User avatar
Dietmar Jahnel
 
Posts: 83
Joined: Mon Oct 17, 2005 10:33 am
Location: Austria

Re: [Plz Linares] How to change the color of a disabled folder?

Postby Antonio Linares » Fri May 15, 2009 9:01 pm

Dietmar,

> it seems that you cannot put these folders in dialogs only

Why ? What error do you get ?
regards, saludos

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

Re: [Plz Linares] How to change the color of a disabled folder?

Postby Dietmar Jahnel » Fri May 15, 2009 9:30 pm

This one:

Application
===========
Path and name: E:\Rida32\rida.exe (32 bits)
Size: 2,744,832 bytes
Time from start: 0 hours 0 mins 0 secs
Error occurred at: 15.05.2009, 22:32:24
Error description: Error FiveWin/3 Cannot create Dialog Box:
Title:
Args:

Stack Calls
===========
Called from: .\source\classes\DIALOG.PRG => CREATEDLGERROR(558)
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE(317)
Called from: RIFolder.prg => TRFOLDER:INICIAR(1296)
Called from: RIFolder.prg => TRFOLDER:REDEFINE(450)

The dialog in line 1296 cannot be created.
I tried the provided sample: ok with window, same with dialog.
I don't know why...
Maybe you can tell,

Regards,
Dietmar
User avatar
Dietmar Jahnel
 
Posts: 83
Joined: Mon Oct 17, 2005 10:33 am
Location: Austria

Re: [Plz Linares] How to change the color of a disabled folder?

Postby Antonio Linares » Fri May 15, 2009 9:48 pm

Dietmar,

Are you using the name "TRFolder" in your resources ?

You must use it.
regards, saludos

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

Re: [Plz Linares] How to change the color of a disabled folder?

Postby Dietmar Jahnel » Sat May 16, 2009 8:08 am

yes, I did.
When you try the sample-file, which does not use resources and change window to dialog you get the same results.
Can you find out why?

Dietmar
User avatar
Dietmar Jahnel
 
Posts: 83
Joined: Mon Oct 17, 2005 10:33 am
Location: Austria

Re: [Plz Linares] How to change the color of a disabled folder?

Postby RAMESHBABU » Sun May 17, 2009 1:37 am

Hi Dietmir,

Please call the function from a Dialog's onit clause as under. It will work.
The working sample is given below.

Regards,

- Ramesh Babu P

Code: Select all  Expand view

#include "FiveWin.ch"
#include "rfolder.ch"

Function Main()

Private oDlg1, oDlg2, oBtn1, oBtn2

DEFINE DIALOG oWin SIZE 800, 800 Title "Teste Folder"

ACTIVATE dialog oWin ON INIT TestFold(oWin)

Return nil

***********

FUNCTION TestFold(oWin)

       @ 40,20 RFolder oFld of oWin Prompts "Page 1", "Page 2", "Page 3",;
                                            "Linha 1", "Linha 2",;
                                            "Aba 1", "Aba 2", "Aba 3", "Aba 4";
               Size 300, 300 Pixel POSICAO 3;
               ORGANIZE 3, 2, 4  NAME "img1", "img2", "img3", "img4", "img1", "img2", "img3", "img4", "img1" ;
               Color CLR_WHITE, nRGB( 117, 174, 162 )

       oFld:ColorSelected( CLR_BLACK, nRGB( 74, 136, 123 ) )
       oFld:lDegrade := .t.


       @  20,20  Say "Teste"       Size 80,20 of oFld:aDialogs[1] Pixel Color CLR_WHITE, nRGB( 255, 137, 281 )
       @  40,100 Button "Ok"       Size 80,20 of oFld:aDialogs[2] Pixel Action msginfo("ok")
       @  62,100 Button "Cancelar" Size 80,20 of oFld:aDialogs[2] Pixel
       @ 100,100 Button "Aba 3"    Size 80,20 of oFld:aDialogs[3] Pixel


       @ 40,420 RFolder oFld2 of oWin Prompts "Folder 1", "Folder 2", "Folder 3";
                Size 300, 300 Pixel POSICAO 6;
                FILE "img1.png", "img2.bmp", "img3.bmp";
                EXACT;

                oFld2:lDegrade := .t.

                oFld2:SetCores( { {CLR_WHITE, nRGB( 142, 39, 28) },;
                                  {CLR_WHITE, nRGB( 39, 142, 128)},;
                                  {CLR_WHITE, nRGB( 128, 39, 255)} } )
                               
       @ 20,20   Say "Teste" Size 120,20 of oFld2:aDialogs[1] Pixel Color CLR_WHITE, CLR_GREEN
       @ 40,100  Button "Ok"        Size  80,20 of oFld2:aDialogs[2] Pixel Action msginfo("ok")
       @ 62,100  Button "Cancelar"  Size  80,20 of oFld2:aDialogs[2] Pixel
       @ 100,100 Button "Folder 2"  Size  80,20 of oFld2:aDialogs[3] Pixel


       @ 370,20 RFolder oFld3 of oWin Prompts "Folder 1", "Folder 2", "Folder3";
                Size 300, 300 Pixel POSICAO 5;  
                Color CLR_BLACK, nRGB( 225, 231, 220 );  //nRGB( 85, 200, 255 ) ;
                EXACT ADJUST //FILE "img1.bmp", "img2.bmp", "img3.bmp";

                oFld3:lDegrade := .t.
                oFld3:nClrMove := nRGB( 255, 167, 79 )

                //oFld3:ColorSelected( CLR_BLACK, nRGB( 0, 136, 202 ) )

       @  20,20  Say "Teste" Size 120,20 of oFld3:aDialogs[1] Pixel Color CLR_WHITE, nRGB( 0, 150, 220 )
       @  40,100 Button "Ok"        Size  80,20 of oFld3:aDialogs[2] Pixel Action msginfo("ok")
       @  62,100 Button "Cancelar"  Size  80,20 of oFld3:aDialogs[2] Pixel
       @ 100,100 Button "Folder 3"  Size  80,20 of oFld3:aDialogs[3] Pixel


       @ 370,420 RFolder oFld4 of oWin;
                 Prompts "Folder 1", "Folder 2", "Folder3", "Aba 1", "Aba 2", "Opcao 1", "Opcao 2", "Opcao 3", "Opcao 4";
                 Size 300, 300 Pixel POSICAO 1;
                 FILE "img1.png", "img2.bmp", "img3.bmp", "img4.bmp", "img1.png", "img2.bmp", "img3.bmp", "img2.bmp", "img3.bmp";
                 COLOR CLR_BLUE, nRGB( 85, 200, 255 ) ;
                 ORGANIZE 3, 2, 4;

       //oFld4:nClrMove := CLR_HGREEN
       oFld4:lDegrade := .t.
       oFld4:ColorSelected( CLR_BLACK, nRGB( 0, 136, 202 ) )

       @ 2,005 button "deleta 1" Size 80,16 Pixel Action oFld:End() of oWin
       @ 2,105 button "deleta 2" Size 80,16 Pixel Action oFld2:End() of oWin
       @ 2,205 button "Hide 3" Size 80,16 Pixel Action oFld3:Hide() of oWin
       @ 2,305 button "Show 3" Size 80,16 Pixel Action oFld3:Show() of oWin
       @ 2,405 button "Disable ABAs 2" Size 80,18 Pixel;
               Action ( oFld:Disable( 2 ),;
                        oFld2:Disable( 2 ),;
                        oFld3:Disable( 2 ),;
                        oFld4:Disable( 2 ) ) of oWin

       @ 2,505 button "Enable ABAs 2" Size 80,18 Pixel;
                Action ( oFld:Enable( 2 ),;
                         oFld2:Enable( 2 ),;
                         oFld3:Enable( 2 ),;
                         oFld4:Enable( 2 ) ) of oWin

       @ 390,745 button "Cores Folder 4" Size 80,18 Pixel Action AlteraCor() of oWin
       @ 410,745 button "Exact Folder 4" Size 80,18 Pixel Action ExactFld4() of oWin


RETURN nil

//----------------------------------------------------------------
Function AlteraCor()

       oFld4:SetCores( { { CLR_WHITE, nRGB( 255, 137, 281 ) },;
                         { CLR_WHITE, nRGB(   0, 128, 192 ) },;
                         { CLR_WHITE, nRGB(   0, 117, 117 ) } } )

Return NIL

//-----------------------------------------------------------------
Function ExactFld4()

  if !oFld4:lExact
     oFld4:Exact()
  else
     oFld4:NoExact()
  endif

Return nIL

**********

 
User avatar
RAMESHBABU
 
Posts: 614
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Re: [Plz Linares] How to change the color of a disabled folder?

Postby Antonio Linares » Sun May 17, 2009 1:51 am

Dietmar,

> yes, I did.

Please post the portion of the RC file where you declare that folder, thanks
regards, saludos

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

Re: [Plz Linares] How to change the color of a disabled folder?

Postby Dietmar Jahnel » Sun May 17, 2009 8:00 am

Antonio Linares wrote:Dietmar,

> yes, I did.

Please post the portion of the RC file where you declare that folder, thanks


here it is:
SUCHFOLDER DIALOG 7, 15, 398, 268
STYLE DS_MODALFRAME | WS_OVERLAPPED | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX
{
CONTROL "", 210, "RFolder", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 0, 5, 399, 261
}

The sample above is working.
But to make these changes in a big application causes a lot of trouble...
Dietmar
User avatar
Dietmar Jahnel
 
Posts: 83
Joined: Mon Oct 17, 2005 10:33 am
Location: Austria

Re: [Plz Linares] How to change the color of a disabled folder?

Postby Antonio Linares » Sun May 17, 2009 9:27 am

Dietmar,

> CONTROL "", 210, "RFolder", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 0, 5, 399, 261

You have to use "TRFolder" instead of "RFolder"
regards, saludos

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

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], nageswaragunupudi and 58 guests