Un ejemplo a ver si me sabe alguien ayudar, Gracias.
Code: Select all
#include "Fivewin.ch"
function Main()
local oDlg_GenAut, oBtnAnade, oBrowPed,;
aValues := { { "One", "Two", "Three" }, { "Four", "Five", "Six" } },;
oGetCodArt, oGetUdsPed, cCod := Space( 14 ), nCan := 0, nRGBColor := nRGB( 0,255,255 )
SetGetColorFocus( nRGBColor )
DEFINE DIALOG oDlg_GenAut RESOURCE "DLG_GENAUT"
REDEFINE BUTTON oBtnAnade ID 4050 OF oDlg_GenAut UPDATE ACTION ( oGetCodArt:Enable(), oGetUdsPed:Enable(), oGetCodArt:SetFocus() )
REDEFINE LISTBOX oBrowPed;
FIELDS aValues[ oBrowPed:nAt, 1 ], aValues[ oBrowPed:nAt, 2 ], aValues[ oBrowPed:nAt, 3 ];
ID 90 OF oDlg_GenAut UPDATE
oBrowPed:SetArray( aValues )
REDEFINE GET oGetCodArt VAR cCod ID 100 OF oDlg_GenAut PICTURE '@!S12' UPDATE;
VALID ( MsgInfo( "Ejecutando Valid" ), .t. )
REDEFINE GET oGetUdsPed VAR nCan ID 140 OF oDlg_GenAut PICTURE '@EZ 999,999' UPDATE;
VALID ( oGetCodArt:Disable(), oGetUdsPed:Disable(), oBrowPed:Refresh(), .t. )
ACTIVATE DIALOG oDlg_GenAut CENTERED ON INIT ( oGetCodArt:Disable(), oGetUdsPed:Disable() )
DbCloseAll()
return nil
Code: Select all
#include <windows.h>
#include <commctrl.h>
#include <richedit.h>
LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US
DLG_GENAUT DIALOG DISCARDABLE 65, 47, 231, 193
STYLE WS_POPUP|DS_MODALFRAME|WS_CAPTION|WS_SYSMENU|WS_VISIBLE
CAPTION "Prueba"
FONT 8, "MS Sans Serif"
{
CONTROL "", 90, "TWBrowse", WS_DISABLED|WS_TABSTOP|0x00b00000, 4, 4, 224, 149
CONTROL "Código:", -1, "Static", WS_GROUP, 4, 164, 28, 9
CONTROL "", 100, "Edit", WS_BORDER|WS_TABSTOP, 36, 160, 63, 12
CONTROL "Cantidad:", -1, "Static", WS_GROUP, 4, 180, 32, 8
CONTROL "", 140, "Edit", WS_BORDER|WS_TABSTOP, 36, 176, 38, 12
CONTROL "Añadir", 4050, "Button", WS_TABSTOP, 120, 160, 52, 12
}