James,
yes, they can be used from resources too. Anyhow the more users that try it the better to improve it
#include "FiveWin.ch"
function Main()
local oDlg, cTest := "Hello world"
DEFINE DIALOG oDlg RESOURCE "Test"
REDEFINE EDIT cTest ID 110 OF oDlg
REDEFINE BUTTON ID 120 OF oDlg ACTION MsgInfo( cTest )
ACTIVATE DIALOG oDlg CENTERED
return nil
#ifdef __FLAT__
1 24 "winxp\WindowsXP.Manifest"
#endif
#ifdef __64__
1 24 "winxp\WindowsXP.Manifest64"
#endif
Test DIALOG 0, 0, 300, 150
STYLE DS_MODALFRAME | WS_BORDER | WS_DLGFRAME | WS_POPUP | WS_SYSMENU
FONT 8, "MS Sans Serif"
CAPTION "Dialog"
BEGIN
EDITTEXT 110, 11, 11, 80, 13, ES_AUTOHSCROLL
PUSHBUTTON "&Value", 120, 112, 112, 60, 17
END
#xcommand REDEFINE EDIT [ <oEdit> VAR ] <uVar> ;
[ ID <nId> ] ;
[ <dlg: OF, WINDOW, DIALOG> <oWnd> ] ;
=> ;
[ <oEdit> := ] TEdit():Redefine( <nId>, [<oWnd>],;
bSETGET(<uVar>) )
METHOD ReDefine( nId, oWnd, bSetGet ) CLASS TEdit
DEFAULT oWnd := GetWndDefault()
::nId = nId
::oWnd = oWnd
::bSetGet = bSetGet
oWnd:DefControl( Self )
return Self
Antonio Linares wrote:If we do that, then it will not be Windows standard.
Antonio Linares wrote:Maybe I am missing something...
James Bott wrote:One interesting point RE spaces.
With (x)Harbour we limit the length of the input by padding any data with spaces so we often have spaces at the end of the text.
I tried a standard Microsoft Windows app (Outlook Express) and by default the fields have no length (and no spaces) and allow you to enter data up to a set length. I don' know how that length is determined. When you enter a field and then press the End button, the cursor doesn't move. Perhaps there is a property to set the field length?
James
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 93 guests