Objects that disappear within the control Group (SOLVED)

User avatar
reinaldocrespo
Posts: 918
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Re: Objects that disappear within the control Group

Post by reinaldocrespo »

This problem has been addressed a few times on this forum. So far, I haven't seen a solution. It has nothing to do with the group box. If you compile your program with control.prg from fwh 2010, the problem will go away. I thought every fw user has been living with the problem. Here is a self-contained reduced sample to reproduce the problem:

Code: Select all

#include "fivewin.ch"

function main()
local oDlg, oChk, oGet1, oGet2
local bNew, bEdit, bSave, bCancel 
local lChk1, lChk2, lChk3
local lEdit         := .f.
local cJob          := ''
local cRevCode  := Spac( 10 )
local cDesc         := Spac( 30 )

   bnew    := {|| lEdit := .T., cJob := 'NEW', oDlg:update(), ;
                     oDlg:aEvalWhen(), oGet1:setFocus() }

   bEdit   := {|| lEdit := .T., cJob := 'EDIT', ;
                      oDlg:update(), oDlg:aEvalWhen(), ;
                      oGet2:setFocus() }

   bSave   := {|| oDlg:update(), lEdit := .F., cJob := '', oDlg:aEvalWhen() }
   bCancel := {|| lEdit := .F., cJob := '', oDlg:aEvalWhen(), oDlg:update(), .F. }

   DEFINE DIALOG oDlg RESOURCE "RevCode" TRANSPARENT COLOR CLR_BLUE, RGB(240,240,240)

   REDEFINE BUTTONBMP ID 127 OF oDlg ACTION EVAL( bNew )    WHEN ! lEdit
   REDEFINE BUTTONBMP ID 128 OF oDlg ACTION Eval( bEdit )   WHEN ! lEdit
   REDEFINE BUTTONBMP ID 129 OF oDlg WHEN ! lEdit
   REDEFINE BUTTONBMP ID 132 OF oDlg ACTION Eval( bSave )   WHEN lEdit
   REDEFINE BUTTONBMP ID 133 OF oDlg ACTION Eval( bCancel ) WHEN lEdit

   REDEFINE GET oGet1 VAR cRevCode ID 101 OF oDlg UPDATE WHEN lEdit .AND. cJob = 'NEW'
   REDEFINE GET oGet2 VAR cDesc    ID 102 OF oDlg UPDATE WHEN lEdit 
   
   REDEFINE CHECKBOX oChk VAR lchk1 ID 106 OF oDlg UPDATE ;
       WHEN lEdit
       
    oChk:bChange := { || oDlg:Update() }
    
   REDEFINE CHECKBOX lChk2 ID 107 OF oDlg UPDATE ;
       WHEN lEdit .and. lChk1
       
   REDEFINE CHECKBOX lChk3 ID 108 OF oDlg UPDATE ;
       WHEN lEdit .and. lChk1
   
   REDEFINE BUTTONBMP ID 126 OF oDlg ACTION oDlg:END() WHEN ! lEdit

   ACTIVATE DIALOG oDlg ;
   VALID IF( GetKeyState(VK_ESCAPE) .AND. lEdit, ;
            EVAL( bCancel ), .t. )
    
    RETURN NIL
 

And the .rc file:

Code: Select all

REVCODE DIALOG 30, 21, 405, 101
STYLE DS_3DLOOK |DS_SETFONT |DS_MODALFRAME |WS_POPUP |WS_VISIBLE |WS_SYSMENU |WS_CAPTION 
CAPTION "Centros de Costo"
FONT 8, "MS Sans Serif"
LANGUAGE LANG_NEUTRAL, 0
BEGIN
  CONTROL "",1001,"BUTTON",BS_GROUPBOX |WS_CHILD |WS_VISIBLE ,9,20,392,53
  CONTROL "",101,"EDIT",ES_LEFT |WS_CHILD |WS_BORDER |WS_TABSTOP |WS_VISIBLE ,100,28,92,12
  CONTROL "",102,"EDIT",ES_LEFT |WS_CHILD |WS_BORDER |WS_TABSTOP |WS_VISIBLE ,100,42,169,12
  CONTROL "    Nuevo",127,"BUTTON",BS_PUSHBUTTON |BS_VCENTER |BS_CENTER |WS_CHILD |WS_TABSTOP |WS_VISIBLE ,6,7,50,14
  CONTROL "    Modificar",128,"BUTTON",BS_PUSHBUTTON |BS_VCENTER |BS_CENTER |WS_CHILD |WS_TABSTOP |WS_VISIBLE ,60,7,50,14
  CONTROL "    Grabar",132,"BUTTON",BS_PUSHBUTTON |BS_VCENTER |BS_CENTER |WS_CHILD |WS_TABSTOP |WS_VISIBLE ,167,7,50,14
  CONTROL "     Cancelar",133,"BUTTON",BS_PUSHBUTTON |BS_VCENTER |BS_CENTER |WS_CHILD |WS_TABSTOP |WS_VISIBLE ,221,7,50,14
  CONTROL "    Salir",126,"BUTTON",BS_PUSHBUTTON |BS_VCENTER |BS_CENTER |WS_CHILD |WS_TABSTOP |WS_VISIBLE ,348,78,50,14
  CONTROL "Centro De Costo",65535,"STATIC",SS_RIGHT |WS_CHILD |WS_GROUP |WS_VISIBLE ,10,31,75,8
  CONTROL "Descripción",65535,"STATIC",SS_RIGHT |WS_CHILD |WS_GROUP |WS_VISIBLE ,10,44,75,8
  CONTROL "    Eliminar",0,"BUTTON",BS_PUSHBUTTON |BS_VCENTER |BS_CENTER |WS_CHILD |WS_TABSTOP |WS_VISIBLE ,73,289,50,14
  CONTROL "    Eliminar",129,"BUTTON",BS_PUSHBUTTON |BS_VCENTER |BS_CENTER |WS_CHILD |WS_TABSTOP |WS_VISIBLE ,113,7,50,14
  CONTROL "Crear Orden",106,"BUTTON",BS_CHECKBOX |BS_LEFT |WS_CHILD |WS_TABSTOP |WS_VISIBLE ,305,31,70,10
  CONTROL "Imprimir Orden",107,"BUTTON",BS_CHECKBOX |BS_LEFT |WS_CHILD |WS_TABSTOP |WS_VISIBLE ,305,42,70,10
  CONTROL "Imprimir Etiqueta",108,"BUTTON",BS_CHECKBOX |BS_LEFT |WS_CHILD |WS_TABSTOP |WS_VISIBLE ,305,54,70,10
END
 
StefanHaupt
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Re: Objects that disappear within the control Group

Post by StefanHaupt »

your sample is working fine with fwh 11.11, no disapearing controls.
kind regards
Stefan
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Objects that disappear within the control Group

Post by Antonio Linares »

Reinaldo,

With FWH 13.01 and Windows 8, your example seems to look fine:

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
tiaofw
Posts: 97
Joined: Fri Dec 12, 2008 4:39 pm
Location: Brasil
Contact:

Re: Objects that disappear within the control Group

Post by tiaofw »

Morning Antonio.

There would be a solution to the RES and xHarbour PellesC?

You saw the screens I sent that work or not depending on the configuration of Windows?

I tested using Windows XP. And. Seven.

Thank you.
Contagem/Brazil
FWH/xharbour 15.12/PELLES C, MED, DBF
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Objects that disappear within the control Group

Post by Antonio Linares »

Tiao,

Sorry I don't remember right now what you are refering to.

Please copy here your msg, or even better, start a new thread, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
tiaofw
Posts: 97
Joined: Fri Dec 12, 2008 4:39 pm
Location: Brasil
Contact:

Re: Objects that disappear within the control Group

Post by tiaofw »

please see Antonio:
Good day.

Returning to the topic, since the problem still persists, with the help of a colleague he noted the following:

Depending on the configuration of Windows, in my case 64-BIT WINDOWS SEVEN, the controls within the control group disappear, see the following screens that illustrate the problem:

http://www.salc.com.br/atual/windowsconfigok.jpg

http://www.salc.com.br/atual/telasistemaok.jpg

http://www.salc.com.br/atual/windowsconfigfail.jpg

http://www.salc.com.br/atual/telasistemafail.jpg

I believe it is a clue to be found the reason for the problem.

Thank you.
Contagem/Brazil
FWH/xharbour 15.12/PELLES C, MED, DBF
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Objects that disappear within the control Group

Post by Antonio Linares »

Tiao,

The screenshot that fails is not using themes, so it seems related to them.

What FWH are you using ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
tiaofw
Posts: 97
Joined: Fri Dec 12, 2008 4:39 pm
Location: Brasil
Contact:

Re: Objects that disappear within the control Group

Post by tiaofw »

Antonio Thanks for the reply.

I use FWH 12.09, corresponding to xHarbour version FWH 12.09.
Contagem/Brazil
FWH/xharbour 15.12/PELLES C, MED, DBF
tiaofw
Posts: 97
Joined: Fri Dec 12, 2008 4:39 pm
Location: Brasil
Contact:

Re: Objects that disappear within the control Group

Post by tiaofw »

Antônio,

Below the screens of PellesC correspondene the screen:

http://www.salc.com.br/atual/pellesctela.jpg
Contagem/Brazil
FWH/xharbour 15.12/PELLES C, MED, DBF
pgfdz
Posts: 145
Joined: Wed Nov 03, 2010 9:16 am

Re: Objects that disappear within the control Group

Post by pgfdz »

Hello

Change you the order of the REDEFINE GROUP

Code: Select all

//REDEFINE GROUP oGroup ID 114 color RGB(255, 0, 0), RGB(182,221,199) of odlg_ped FONT oFont1 PROMPT "Configuração Retaguarda" TRANSPARENT

REDEFINE radio orad var v_retaguar ID 801, 803 COLOR RGB(0, 0, 0), RGB(182,221,199) of odlg_ped UPDATE

REDEFINE SAY ID 38 color RGB(0, 0, 0), RGB(182,221,199) of odlg_ped FONT oFont1 UPDATE
REDEFINE get ogetdir var v_dirserver picture '@!' ID 216 of odlg_ped ;
         color get_frente,get_fundo BITMAP "pastas" ;
         Action (v_dirserver:=if(empty(dir_teste:= ;
         cgetdir32('Selecione o Diretório',v_dirserver)), ;
         v_dirserver,dir_teste),odlg_ped:update(),sysrefresh()) ;
         update when if(v_retaguar == 1, .t.,  ;
         if(v_retaguar # 1, (v_dirserver := space(len(v_dirserver)), ;
         ogetdir:refresh(), sysrefresh(), .f.), .t.))

REDEFINE GROUP oGroup ID 114 color RGB(255, 0, 0), RGB(182,221,199) of odlg_ped FONT oFont1 PROMPT "Configuração Retaguarda" TRANSPARENT

ACTIVATE DIALOG odlg_ped CENTERED ON INIT MudarFoco(@oFld_SPED)

return nil


function MudarFoco(oFld_SPED)

oFld_SPED:aDialogs[1]:bStart:={|| oFld_SPED:aDialogs[1]:SetFocus() }
oFld_SPED:refresh(.t.)

return(NIL)
 
A greeting
Paco García
tiaofw
Posts: 97
Joined: Fri Dec 12, 2008 4:39 pm
Location: Brasil
Contact:

Re: Objects that disappear within the control Group (Solved)

Post by tiaofw »

thanks pgfdz.

Your suggestion did not work, but I found out what was influencing and apparently fixed the problem:

I set the option "transparent" the Group Box control in PellesC to "no" and the objects within the Group reappeared.

See the screen:

http://www.salc.com.br/atual/pellesccon ... oupbox.jpg

http://www.salc.com.br/atual/telasalcap ... ellesc.jpg


Stay there a hint to who has the same problem.

Thanks Antônio and all of that forum.
Contagem/Brazil
FWH/xharbour 15.12/PELLES C, MED, DBF
Post Reply