Objects that disappear within the control Group (SOLVED)

Re: Objects that disappear within the control Group

Postby reinaldocrespo » Fri Feb 08, 2013 2:17 am

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  Expand view
#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  Expand view
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
 
User avatar
reinaldocrespo
 
Posts: 979
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Re: Objects that disappear within the control Group

Postby StefanHaupt » Fri Feb 08, 2013 8:02 am

your sample is working fine with fwh 11.11, no disapearing controls.
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Re: Objects that disappear within the control Group

Postby Antonio Linares » Mon Feb 11, 2013 11:43 pm

Reinaldo,

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

Image
regards, saludos

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

Re: Objects that disappear within the control Group

Postby tiaofw » Tue Feb 12, 2013 12:28 pm

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
tiaofw
 
Posts: 99
Joined: Fri Dec 12, 2008 4:39 pm
Location: Brasil

Re: Objects that disappear within the control Group

Postby Antonio Linares » Tue Feb 12, 2013 12:36 pm

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
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Objects that disappear within the control Group

Postby tiaofw » Tue Feb 12, 2013 1:58 pm

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
tiaofw
 
Posts: 99
Joined: Fri Dec 12, 2008 4:39 pm
Location: Brasil

Re: Objects that disappear within the control Group

Postby Antonio Linares » Tue Feb 12, 2013 2:12 pm

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
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Objects that disappear within the control Group

Postby tiaofw » Tue Feb 12, 2013 2:17 pm

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: 99
Joined: Fri Dec 12, 2008 4:39 pm
Location: Brasil

Re: Objects that disappear within the control Group

Postby tiaofw » Tue Feb 12, 2013 2:27 pm

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
tiaofw
 
Posts: 99
Joined: Fri Dec 12, 2008 4:39 pm
Location: Brasil

Re: Objects that disappear within the control Group

Postby pgfdz » Tue Feb 12, 2013 3:02 pm

Hello

Change you the order of the REDEFINE GROUP

Code: Select all  Expand view

//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
pgfdz
 
Posts: 145
Joined: Wed Nov 03, 2010 9:16 am

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

Postby tiaofw » Tue Feb 12, 2013 5:06 pm

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
tiaofw
 
Posts: 99
Joined: Fri Dec 12, 2008 4:39 pm
Location: Brasil

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 116 guests