con FiveWin e Harbour ho un problema su refresh di una say su un Folder. Cambiando il valore della variabile la say viene aggiornata senza eliminare il valore precedente e pertanto si vedono i valori sovrapposti; su una Dialog invece viene eliminato il valore precedente ed il nuovo valore si legge correttamente.
Per spiegarmi meglio allego il codice modificato di Bigfold.prg e Bigfold.rc contenuti nella cartella Samples. Cliccando sul pulsante "?" presente nel folder One vengono incrementati le variabili delle say sulla Dialog e sul Folder e viene eseguito il refresh() delle due say; sulla Dialog la say si vede correttamente mentre sul Folder si sovrappongono i valori.
Bigfolder.prg
Code: Select all
// testing a many pages folder
#include "FiveWin.ch"
static oWnd, NumDlg, NumFld, oSayFld, oSayDlg
function Main()
BWCCRegister(GetResources())
SET _3DLOOK ON
DEFINE WINDOW oWnd TITLE "A many pages folder" ;
MENU BuildMenu()
ACTIVATE WINDOW oWnd MAXIMIZED
return nil
DLL32 FUNCTION BWCCRegister( hInst AS LONG) AS WORD PASCAL LIB "BWCC32.DLL"
function BuildMenu()
local oMenu
MENU oMenu
MENUITEM "Try it!" ACTION BigFolder()
MENUITEM "Info" ACTION MsgAbout()
MENUITEM "Exit" ACTION oWnd:End()
ENDMENU
return oMenu
function BigFolder()
local oDlg, oFld, oLbx
local cOne := "Hello"
local oFont
NumDlg = 1
NumFld = 1
USE Customer
DEFINE FONT oFont NAME "Arial" SIZE 0, -10
DEFINE DIALOG oDlg RESOURCE "Test"
REDEFINE SAY oSayDlg PROMPT NumDlg ;
ID 2101 OF oDlg
REDEFINE FOLDER oFld ID 110 OF oDlg ;
PROMPTS "One", "Two", "Three";
DIALOGS "One", "Three", "Three"
REDEFINE LISTBOX oLbx FIELDS ;
ID 110 OF oFld:aDialogs[ 1 ] ;
FONT oFont
REDEFINE SAY oSayFld PROMPT NumFld ;
ID 2201 OF oFld:aDialogs[1]
REDEFINE BTNBMP ID 120 OF oFld:aDialogs[ 1 ] ;
RESOURCE "Info" ACTION ChangeSay( )
REDEFINE LISTBOX oLbx FIELDS ;
ID 110 OF oFld:aDialogs[ 2 ]
REDEFINE LISTBOX oLbx FIELDS ;
ID 110 OF oFld:aDialogs[ 3 ]
ACTIVATE DIALOG oDlg CENTERED
USE
return nil
Function ChangeSay()
NumDlg = NumDlg + 1
NumFld = NumFld + 1
oSayDlg:Refresh()
oSayFld:Refresh()
return Nil
Bigfolder.rc
Code: Select all
#define IDC_PUSHBUTTON2 111
#define IDC_CHECKBOX1 111
#define IDC_PUSHBUTTON1 112
#define BITMAP_1 1
#include "..\include\WinApi.ch"
test DIALOG 9, 30, 298, 194
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "DIALOG_1"
FONT 8, "MS Sans Serif"
{
DEFPUSHBUTTON "OK", IDOK, 67, 173, 50, 14
PUSHBUTTON "Cancel", IDCANCEL, 124, 173, 50, 14
PUSHBUTTON "Help", 998, 180, 173, 50, 14
CONTROL "", 110, FOLDER32, 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 4, 7, 289, 162
LTEXT " ", 2101, 275, 3, 38, 10, WS_CHILD | WS_VISIBLE | WS_GROUP
}
one DIALOG 6, 15, 277, 157
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
{
CONTROL "", 110, "TWBrowse", 0 | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 10, 10, 268, 104
CONTROL "", 120, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE, 121, 122, 20, 20
CONTROL "", -1, "BorShade", BSS_HDIP | BSS_LEFT | WS_CHILD | WS_VISIBLE, 89, 117, 100, 2
CONTROL "Button-1", IDC_PUSHBUTTON2, "BorBtn", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 20, 120, 37, 25
LTEXT " ", 2201, 270, 130, 38, 10, WS_CHILD | WS_VISIBLE | WS_GROUP
}
two DIALOG 6, 15, 277, 189
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
{
CONTROL "", 110, "TWBrowse", 0 | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 10, 10, 268, 104
CONTROL "Button", 1, "BorBtn", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 118, 121, 37, 25
CONTROL "Check", IDC_CHECKBOX1, "BorCheck", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 189, 127, 34, 10
CONTROL "Button-2", IDC_PUSHBUTTON1, "BorBtn", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 28, 147, 37, 25
}
three DIALOG 6, 15, 277, 151
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
{
CONTROL "", 110, "TWBrowse", 0 | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 5, 9, 268, 104
CONTROL "Button-3", 1, "BorBtn", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 118, 121, 37, 25
}
info BITMAP "../bitmaps/info.bmp"
Grazie in anticipo a tutti.