Hello!
How can I dimmed or grayed xBrowse?
I tried oBrw:Disable() but still in predefined colors unlike other objects like Get, Radio, etc... they are dimmed when is oOBj:Disable().
Any Idea?
Regards,
Fraxzi
Dimmed xBrowse
Dimmed xBrowse
Kind Regards,
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
- nageswaragunupudi
- Posts: 10721
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 8 times
- Contact:
Re: Dimmed xBrowse
Please try this or similar code:
oBrw:bClrStd := { || If( oBrw:lActive, { CLR_BLACK, CLR_WHITE }, { CLR_WHITE, CLR_HGRAY } ) }
func BrwDisable( oBrw )
oBrw:SetColor( CLR_WHITE, CLR_HGRAY )
oBrw:Disable()
return nil
func BrwEnable( oBrw )
oBrw:SetColor( CLR_BLACK, CLR_WHITE )
oBrw:Enable()
oBrw:Refresh()
return nil
Now you can use BrwDisable and BrwEnable functions.
oBrw:bClrStd := { || If( oBrw:lActive, { CLR_BLACK, CLR_WHITE }, { CLR_WHITE, CLR_HGRAY } ) }
func BrwDisable( oBrw )
oBrw:SetColor( CLR_WHITE, CLR_HGRAY )
oBrw:Disable()
return nil
func BrwEnable( oBrw )
oBrw:SetColor( CLR_BLACK, CLR_WHITE )
oBrw:Enable()
oBrw:Refresh()
return nil
Now you can use BrwDisable and BrwEnable functions.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Dimmed xBrowse
nageswaragunupudi wrote:Please try this or similar code:
oBrw:bClrStd := { || If( oBrw:lActive, { CLR_BLACK, CLR_WHITE }, { CLR_WHITE, CLR_HGRAY } ) }
func BrwDisable( oBrw )
oBrw:SetColor( CLR_WHITE, CLR_HGRAY )
oBrw:Disable()
return nil
func BrwEnable( oBrw )
oBrw:SetColor( CLR_BLACK, CLR_WHITE )
oBrw:Enable()
oBrw:Refresh()
return nil
Now you can use BrwDisable and BrwEnable functions.
Thanks Nageswaragunupudi ,
I did
Code: Select all | Expand
local lDimmed := .F.
...
WITH OBJECT oBrw
:bClrStd := {|| IF( lDimmed, { nRGB(204,204,204) , nRGB(235,233,237) }, {CLR_BLACK, GetSysColor( COLOR_WINDOW )} ) }
:bClrSel := {|| IF( lDimmed, { nRGB(204,204,204) , nRGB(235,233,237) }, {CLR_BLACK, CLR_YELLOW} ) }
:bClrSelFocus := :bClrSel
:bClrHeader := {|| IF( lDimmed, { nRGB(204,204,204) , nRGB(235,233,237), nRGB(235,233,237), nRGB(235,233,237)},;
{ CLR_BLACK , nRGB(196,225,255), nRGB(125,165,224), nRGB(203,225,252 )} ) }
:bClrFooter := :bClrHeader
END//with
...
then somewhere in code...
Code: Select all | Expand
...
lDimmed := .T.
oBrw:Refresh(.T.)
oBrw:Disable()
...
It works fine... But I thinks yours is more simplified.
Dimming xBrowse when :disable() (Maybe), should be included in next xBrowse version. Just a thoughts.
Thank you!.
Kind Regards,
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Re: Dimmed xBrowse
nageswaragunupudi wrote:Please try this or similar code:
oBrw:bClrStd := { || If( oBrw:lActive, { CLR_BLACK, CLR_WHITE }, { CLR_WHITE, CLR_HGRAY } ) }
func BrwDisable( oBrw )
oBrw:SetColor( CLR_WHITE, CLR_HGRAY )
oBrw:Disable()
return nil
func BrwEnable( oBrw )
oBrw:SetColor( CLR_BLACK, CLR_WHITE )
oBrw:Enable()
oBrw:Refresh()
return nil
Now you can use BrwDisable and BrwEnable functions.
Thanks Nageswaragunupudi ,
I did
Code: Select all | Expand
local lDimmed := .F.
...
WITH OBJECT oBrw
:bClrStd := {|| IF( lDimmed, { nRGB(204,204,204) , nRGB(235,233,237) }, {CLR_BLACK, GetSysColor( COLOR_WINDOW )} ) }
:bClrSel := {|| IF( lDimmed, { nRGB(204,204,204) , nRGB(235,233,237) }, {CLR_BLACK, CLR_YELLOW} ) }
:bClrSelFocus := :bClrSel
:bClrHeader := {|| IF( lDimmed, { nRGB(204,204,204) , nRGB(235,233,237), nRGB(235,233,237), nRGB(235,233,237)},;
{ CLR_BLACK , nRGB(196,225,255), nRGB(125,165,224), nRGB(203,225,252 )} ) }
:bClrFooter := :bClrHeader
END//with
...
then somewhere in code...
Code: Select all | Expand
...
lDimmed := .T.
oBrw:Refresh(.T.)
oBrw:Disable()
...
It works fine... But I think yours is better simplified.
Dimming xBrowse when :disable() (Maybe), should be included in next xBrowse version. Just a thoughts.
Thank you!.
Kind Regards,
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
- Antonio Linares
- Site Admin
- Posts: 42521
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 75 times
- Contact:
- nageswaragunupudi
- Posts: 10721
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 8 times
- Contact:
Re: Dimmed xBrowse
>>
Dimming xBrowse when :disable() (Maybe), should be included in next xBrowse version. Just a thoughts.
>>
When a oBrw:Disable() is called oBrw:lActive is automatically set to .f. and when oBrw:Enable() is called oBrw:lActive is automatically set to .T. , That is a part of Window.prg code. This can be used for all windows ( and all controls )
When there is this oBrw:lActive is already available, why do you want to create a new variable lDimmed ? Are you not duplicating unnecessarily ?
So please use oBrw:lActive. No need to create and manage another variable lDimmed and no need for any change in Libraray. The facility already exists
Dimming xBrowse when :disable() (Maybe), should be included in next xBrowse version. Just a thoughts.
>>
When a oBrw:Disable() is called oBrw:lActive is automatically set to .f. and when oBrw:Enable() is called oBrw:lActive is automatically set to .T. , That is a part of Window.prg code. This can be used for all windows ( and all controls )
When there is this oBrw:lActive is already available, why do you want to create a new variable lDimmed ? Are you not duplicating unnecessarily ?
So please use oBrw:lActive. No need to create and manage another variable lDimmed and no need for any change in Libraray. The facility already exists
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Dimmed xBrowse
nageswaragunupudi wrote:>>
Dimming xBrowse when :disable() (Maybe), should be included in next xBrowse version. Just a thoughts.
>>
When a oBrw:Disable() is called oBrw:lActive is automatically set to .f. and when oBrw:Enable() is called oBrw:lActive is automatically set to .T. , That is a part of Window.prg code. This can be used for all windows ( and all controls )
When there is this oBrw:lActive is already available, why do you want to create a new variable lDimmed ? Are you not duplicating unnecessarily ?
So please use oBrw:lActive. No need to create and manage another variable lDimmed and no need for any change in Libraray. The facility already exists
Dear nageswaragunupudi,
You are correct. No need to create lDimmed variable.
I will change my code based on oBrw:lActive instead of lDimmed variable.
Many thanks!
Regards,
Fraxzi
Kind Regards,
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Re: Dimmed xBrowse
Antonio Linares wrote:Frances,
Please review FWH\samples\TestBlu2.prg example:
Dear Mr. Antonio,
Thank you so much! this what I'm looking for. I will try and test this great sample to dialog and window too.
Regards,
Frances
Kind Regards,
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15