topic
stringlengths
1
63
text
stringlengths
1
577k
Combometro
Dear Mr. Rao, I can't find out without changing the source code how to do this. I mean to enter a new text which is not inside the list. Best regards, Otto
Combometro
Hello Antonio, Is there another solution without changing the source of combom.prg? Best regards, Otto [quote:37wtwd6n] I can't find out without changing the source code how to do this. I mean to enter a new text which is not inside the list. [/quote:37wtwd6n]
Combometro
Any news? Best regards, Otto
Combometro
Hello Antonio, does Fivewin provide in near future this features? Thanks in advance Otto
Combometro
Hello Antonio, do you think you can provide this Feature soon? Please let me know. Otherwise I search for a workaround. Best regards, Otto
Combometro
It seems that beside me no one is using ComboMetro. For my purpose I made a workaround: I create a comboMetro a get and a button With hide, enable, disable and some changes in source I have now the same behavior as comboBox drop down but with metro like style. Best regards, Otto
Combos FWPPC 8.10
Buenos días foro, tengo un problema con combos desde código incrustado en un dialogo. El único ejemplo que hay en samples es combos.prg pero faltaba el combos.ch, he cogido un combos.ch que tenía por ahi con esta estructura:[code:2asu04fg] #define ID_SIMPLE 110 #define ID_DROPDOWN 120 #define ID_DROPDOWNLIST 130 #define ID_SELECTION 140 [/code:2asu04fg]suponiendo que esto está bien, cuando compilo el combos.prg, los elementos de los combos NO me aparecen aunque si los selecciono si cambian.Reitero si me podeis poner un ejemplo manejando combos en dialogos, pero NO desde recursos.Muchas Gracias a todos.
Combos FWPPC 8.10
Mike,Aqui tienes un ejemplo:[code:3r3xpzyq] #include "FWCE.ch" function Main() local oDlg, cValue DEFINE DIALOG oDlg TITLE "Combos" ; SIZE 200, 100 @ 1, 1 COMBOBOX cValue ITEMS { "One", "Two", "Three" } OF oDlg ACTIVATE DIALOG oDlg CENTERED return nil [/code:3r3xpzyq]
Combos FWPPC 8.10
Ups! <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> Me sale exactamente igual que en el ejemplo. Me pinta el combo se despliega pero está vacíoEstoy compilando con FWPPC 8.10, este es mi buildce.bat[code:1j8732yz] @ECHO OFF CLS ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ECHO ³ FiveWin for Pocket PC - October 2008 Harbour development power ³Ü ECHO ³ &#40;c&#41; FiveTech, 1993-2008 for Microsoft Windows Pocket PC ³Û ECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ ECHO ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß if A%1 == A GOTO &#58;SINTAX if NOT EXIST %1&#46;prg GOTO &#58;NOEXIST ECHO Compiling&#46;&#46;&#46; IF "%FWDIR%" == "" set FWDIR="c&#58;\software\fwppc810\fwppc" set hdir=c&#58;\software\fwppc810\harbour_ce set hdirc=%hdir%\bin set hdirl=%hdir%\lib set fwppc=c&#58;\software\fwppc810\fwppc set vcdir=c&#58;\software\fwppc810\vce set include=%vcdir%\include\arm;%hdir%\include;%include% set lib=%vcdir%\lib;%hdir%\lib;%lib% set emulator_shared_folder=c&#58;\pocketpc %hdirc%\harbour %1 /n /i&#46;&#46;\include;%hdir%\include /p %2 %3 > clip&#46;log IF ERRORLEVEL 1 GOTO COMPILEERROR @type clip&#46;log %vcdir%\bin\clarm -W3 -c /DARM /DUNICODE /I%hdir%\include /I%fwppc%\include %1&#46;c &#58;ENDCOMPILE IF EXIST %1&#46;rc %vcdir%\bin\rc -r -d_CE %1 echo %1&#46;obj > msvc&#46;tmp echo %fwppc%\lib\FiveCE&#46;lib %fwppc%\lib\FiveCEC&#46;lib >> msvc&#46;tmp echo %hdirl%\hbrtl&#46;lib >> msvc&#46;tmp echo %hdirl%\hbvm&#46;lib >> msvc&#46;tmp echo %hdirl%\gtgui&#46;lib >> msvc&#46;tmp echo %hdirl%\hblang&#46;lib >> msvc&#46;tmp echo %hdirl%\hbmacro&#46;lib >> msvc&#46;tmp echo %hdirl%\hbrdd&#46;lib >> msvc&#46;tmp echo %hdirl%\rddntx&#46;lib >> msvc&#46;tmp echo %hdirl%\rddcdx&#46;lib >> msvc&#46;tmp echo %hdirl%\rddfpt&#46;lib >> msvc&#46;tmp echo %hdirl%\hbsix&#46;lib >> msvc&#46;tmp echo %hdirl%\hbdebug&#46;lib >> msvc&#46;tmp echo %hdirl%\hbcommon&#46;lib >> msvc&#46;tmp echo %hdirl%\hbpp&#46;lib >> msvc&#46;tmp echo %hdirl%\hbcpage&#46;lib >> msvc&#46;tmp echo %hdirl%\hbw32&#46;lib >> msvc&#46;tmp rem echo %hdirl%\tip&#46;lib >> msvc&#46;tmp echo %hdirl%\hbpcre&#46;lib >> msvc&#46;tmp echo %vcdir%\lib\arm\coredll&#46;lib >> msvc&#46;tmp echo %vcdir%\lib\arm\corelibc&#46;lib >> msvc&#46;tmp echo %vcdir%\lib\arm\aygshell&#46;lib >> msvc&#46;tmp echo %vcdir%\lib\arm\ws2&#46;lib >> msvc&#46;tmp echo %vcdir%\lib\arm\mfcce400&#46;lib >> msvc&#46;tmp echo %vcdir%\lib\arm\ole32&#46;lib >> msvc&#46;tmp echo %vcdir%\lib\arm\oleaut32&#46;lib >> msvc&#46;tmp echo %vcdir%\lib\arm\olece400&#46;lib >> msvc&#46;tmp echo %vcdir%\lib\arm\uuid&#46;lib >> msvc&#46;tmp echo %vcdir%\lib\arm\ceshell&#46;lib >> msvc&#46;tmp echo %vcdir%\lib\arm\commctrl&#46;lib >> msvc&#46;tmp echo %vcdir%\lib\arm\wininet&#46;lib >> msvc&#46;tmp IF EXIST %1&#46;res echo %1&#46;res >> msvc&#46;tmp %vcdir%\bin\link @msvc&#46;tmp /nologo /SUBSYSTEM&#58;WINDOWSCE,4&#46;20 /MACHINE&#58;ARM /ARMPADCODE&#58;NO IF ERRORLEVEL 1 GOTO LINKERROR ECHO * Application successfully built * copy %1&#46;exe %emulator_shared_folder% cecopy %1&#46;exe dev&#58;\samples GOTO EXIT ECHO rem delete temporary files @del %1&#46;c @del %1&#46;obj @del %1&#46;ppo @del msvc&#46;tmp &#58;COMPILEERROR @type clip&#46;log ECHO * Compile errors * GOTO EXIT &#58;LINKERROR ECHO * Linking errors * GOTO EXIT &#58;SINTAX ECHO SYNTAX&#58; Build &#91;Program&#93; &#123;-- No especifiques la extensi¢n PRG ECHO &#123;-- Don't specify &#46;PRG extension GOTO EXIT [/code:1j8732yz]¿Que puede ser?Muchas Gracias
Combos FWPPC 8.10
Mike,Añade esta clase entera al final de mi ejemplo y vuelve a construirlo, graciascombobox.prg fwppc[code:rar4bpnn] // FWPPC Class TComboBox &#40;C&#41; FiveTech Software 2005 #include "FiveWin&#46;ch" #include "Constant&#46;ch" #define GWL_STYLE -16 #define COMBO_BASE 0x140 #define CB_ADDSTRING &#40; COMBO_BASE + 3 &#41; #define CB_DELETESTRING &#40; COMBO_BASE + 4 &#41; #define CB_GETCURSEL &#40; COMBO_BASE + 7 &#41; #define CB_INSERTSTRING &#40; COMBO_BASE + 10 &#41; #define CB_RESETCONTENT &#40; COMBO_BASE + 11 &#41; #define CB_FINDSTRING &#40; COMBO_BASE + 12 &#41; #define CB_SETCURSEL &#40; COMBO_BASE + 14 &#41; #define CB_SHOWDROPDOWN &#40; COMBO_BASE + 15 &#41; #define CB_GETDROPPEDSTATE &#40; COMBO_BASE + 23 &#41; #define CB_ERR -1 #define CB_SETMINVISIBLE 5889 // 0x1701 #define CB_GETMINVISIBLE 5890 // 0x1702 #define SYS_COLOR_INDEX_FLAG 0x40000000 #define COLOR_WINDOW nOr&#40; 5, SYS_COLOR_INDEX_FLAG &#41; #define COLOR_WINDOWTEXT nOr&#40; 8, SYS_COLOR_INDEX_FLAG &#41; #define MB_ICONEXCLAMATION 48 // 0x0030 #define GW_CHILD 5 #define GW_HWNDNEXT 2 //----------------------------------------------------------------------------// CLASS TComboBox FROM TControl DATA aItems, aBitmaps DATA lOwnerDraw, nBmpHeight, nBmpWidth DATA nAt DATA bDrawItem, bCloseUp DATA cError AS String DATA oGet METHOD New&#40; nRow, nCol, bSetGet, aItems, nWidth, nHeight, oWnd, nHelpId,; bChange, bValid, nClrText, nClrBack, lPixel, oFont,; cMsg, lUpdate, bWhen, lDesign, acBitmaps, bDrawItem, nStyle,; cPict, bEChange &#41; CONSTRUCTOR METHOD ReDefine&#40; nId, bSetGet, aItems, oWnd, nHelpId, bValid, ; bChange, nClrText, nClrBack, cMsg, lUpdate,; bWhen, acBitmaps, bDrawItem, nStyle, cPict, bEChange &#41; CONSTRUCTOR METHOD Add&#40; cItem, nAt &#41; METHOD cToChar&#40;&#41; INLINE Super&#58;cToChar&#40; "COMBOBOX" &#41; METHOD Change&#40;&#41; METHOD Close&#40;&#41; INLINE &#58;&#58;SendMsg&#40; CB_SHOWDROPDOWN, 0 &#41; METHOD CloseUp&#40;&#41; INLINE If&#40; &#58;&#58;bCloseUp != nil, Eval&#40; &#58;&#58;bCloseUp, Self &#41;,&#41; METHOD Default&#40;&#41; METHOD DefControl&#40; oControl &#41; METHOD Del&#40; nAt &#41; METHOD Destroy&#40;&#41; METHOD DrawItem&#40; nIdCtl, nPStruct &#41; METHOD FillMeasure&#40; nPInfo &#41; INLINE LbxMeasure&#40; nPInfo, &#58;&#58;nBmpHeight &#41; METHOD FindString&#40; cItem, nFrom &#41; INLINE ; nFrom &#58;= If&#40; nFrom == nil, 0, nFrom &#41;,; &#58;&#58;SendMsg&#40; CB_FINDSTRING, nFrom, cItem &#41; + 1 METHOD Find&#40; cItem, nFrom &#41; INLINE &#58;&#58;FindString&#40; cItem, nFrom &#41; != 0 METHOD GetDlgCode&#40; nLastKey &#41; METHOD GetMinVisible&#40;&#41; INLINE If&#40; IsAppThemed&#40;&#41;, ; &#58;&#58;SendMsg&#40; CB_GETMINVISIBLE, 0, 0 &#41;, 0 &#41; METHOD Initiate&#40; hDlg &#41; METHOD Insert&#40; cItem, nAt &#41; METHOD KeyChar&#40; nKey, nFlags &#41; METHOD LostFocus&#40;&#41; METHOD lValid&#40;&#41; METHOD Modify&#40; cItem, nAt &#41; METHOD MouseMove&#40; nRow, nCol, nKeyFlags &#41; METHOD Open&#40;&#41; INLINE &#58;&#58;SendMsg&#40; CB_SHOWDROPDOWN, 1 &#41; METHOD Refresh&#40;&#41; INLINE &#58;&#58;Set&#40; Eval&#40; &#58;&#58;bSetGet &#41; &#41;, Super&#58;Refresh&#40;&#41; METHOD Reset&#40;&#41; INLINE Eval&#40; &#58;&#58;bSetGet,; If&#40; ValType&#40; Eval&#40; &#58;&#58;bSetGet &#41; &#41; == "N", 0, "" &#41; &#41;,; &#58;&#58;nAt &#58;= 0, &#58;&#58;SendMsg&#40; CB_RESETCONTENT &#41;,; &#58;&#58;Change&#40;&#41; METHOD Select&#40; nItem &#41; INLINE &#58;&#58;nAt &#58;= nItem,; &#58;&#58;SendMsg&#40; CB_SETCURSEL, Max&#40; 0, nItem - 1 &#41;, 0 &#41; METHOD Set&#40; cNewItem &#41; METHOD SetBitmaps&#40; acBitmaps &#41; METHOD SetItems&#40; aItems &#41; INLINE &#58;&#58;Reset&#40;&#41;, &#58;&#58;aItems &#58;= aItems,; &#58;&#58;Default&#40;&#41;, &#58;&#58;Change&#40;&#41; // By default, 30 is the minimum number of visible items in XP Visual Themes #ifndef __CLIPPER__ METHOD SetMinVisible&#40; nItems &#41; INLINE ; If&#40; IsAppThemed&#40;&#41;, &#40; &#58;&#58;SendMsg&#40; CB_SETMINVISIBLE, nItems, 0 &#41; == 1 &#41;, &#46;f&#46; &#41; #endif METHOD ShowToolTip&#40;&#41; METHOD VarGet&#40;&#41; METHOD State&#40;&#41; INLINE &#58;&#58;SendMsg&#40; CB_GETDROPPEDSTATE, 0 &#41; METHOD IsClosed&#40;&#41; INLINE &#58;&#58;State&#40;&#41; == 0 METHOD IsOpen&#40;&#41; INLINE &#58;&#58;State&#40;&#41; == 1 METHOD LButtonDown&#40;&#41; INLINE &#58;&#58;Open&#40;&#41; ENDCLASS //----------------------------------------------------------------------------// METHOD New&#40; nRow, nCol, bSetGet, aItems, nWidth, nHeight, oWnd, nHelpId,; bChange, bValid, nClrFore, nClrBack, lPixel, oFont,; cMsg, lUpdate, bWhen, lDesign, acBitmaps, bDrawItem, nStyle,; cPict, bEChange &#41; CLASS TComboBox if nClrFore == nil nClrBack &#58;= GetSysColor&#40; COLOR_WINDOW &#41; endif DEFAULT nRow &#58;= 0, nCol &#58;= 0, bSetGet &#58;= &#123; || nil &#125;,; oWnd &#58;= GetWndDefault&#40;&#41;,; oFont &#58;= oWnd&#58;oFont,; aItems &#58;= &#123;&#125;, nWidth &#58;= 40, nHeight &#58;= 60,; nClrFore &#58;= GetSysColor&#40; COLOR_WINDOWTEXT &#41;,; lPixel &#58;= &#46;f&#46;, lUpdate &#58;= &#46;f&#46;, lDesign &#58;= &#46;f&#46;,; nStyle &#58;= CBS_DROPDOWNLIST &#58;&#58;cCaption = "" &#58;&#58;nTop = nRow * If&#40; lPixel, 1, CMB_CHARPIX_H &#41; &#58;&#58;nLeft = nCol * If&#40; lPixel, 1, CMB_CHARPIX_W &#41; &#58;&#58;nBottom = &#58;&#58;nTop + nHeight - 1 &#58;&#58;nRight = &#58;&#58;nLeft + nWidth - 1 &#58;&#58;nAt = 0 &#58;&#58;aItems = aItems &#58;&#58;bChange = bChange &#58;&#58;bSetGet = bSetGet &#58;&#58;oWnd = oWnd &#58;&#58;oFont = oFont if acBitmaps != nil &#58;&#58;SetBitmaps&#40; acBitmaps &#41; else &#58;&#58;lOwnerDraw = &#46;f&#46; endif &#58;&#58;nStyle = nOR&#40; If&#40; nStyle == CBS_DROPDOWN, 0, LBS_NOTIFY &#41;, WS_TABSTOP,; nStyle,; LBS_DISABLENOSCROLL, WS_CHILD, WS_VISIBLE, WS_BORDER,; WS_VSCROLL, If&#40; lDesign, WS_CLIPSIBLINGS, 0 &#41;,; If&#40; &#58;&#58;lOwnerDraw, CBS_OWNERDRAWFIXED, 0 &#41; &#41; &#58;&#58;nId = &#58;&#58;GetNewId&#40;&#41; &#58;&#58;nHelpId = nHelpId &#58;&#58;bValid = bValid &#58;&#58;lDrag = lDesign &#58;&#58;lCaptured = &#46;f&#46; &#58;&#58;cMsg = cMsg &#58;&#58;lUpdate = lUpdate &#58;&#58;bWhen = bWhen &#58;&#58;bDrawItem = bDrawItem &#58;&#58;SetColor&#40; nClrFore, nClrBack &#41; if nStyle == CBS_DROPDOWN &#58;&#58;oGet &#58;= TGet&#40;&#41;&#58;ReDefine&#40; nil, ; // ID not used &#58;&#58;bSetGet, ; // bSETGET&#40;uVar&#41; Self, ; // oDlg &#58;&#58;nHelpID, ; // Help Context ID cPict, ; // Picture nil, ; // Valid is handled by the CBx &#58;&#58;nClrText,; &#58;&#58;nClrPane,; &#58;&#58;oFont, ; // <oFont> nil, ; // <oCursor> cMsg, ; // cMsg nil, ; // <&#46;update&#46;> nil, ; // <&#123;uWhen&#125;> bEChange, ; // &#123;|nKey,nFlags,Self| <uEChange>&#125; &#46;F&#46; &#41; // <&#46;readonly&#46;> &#41; endif if ! Empty&#40; oWnd&#58;hWnd &#41; &#58;&#58;Create&#40; "COMBOBOX" &#41; &#58;&#58;nHeight = nHeight &#58;&#58;nWidth = nWidth &#58;&#58;Default&#40;&#41; if oFont != nil &#58;&#58;SetFont&#40; oFont &#41; endif oWnd&#58;AddControl&#40; Self &#41; else oWnd&#58;DefControl&#40; Self &#41; endif if &#58;&#58;oGet != nil &#58;&#58;oGet&#58;hWnd = GetWindow&#40; &#58;&#58;hWnd, GW_CHILD &#41; &#58;&#58;oGet&#58;Link&#40;&#41; &#58;&#58;oGet&#58;bLostFocus = ; &#123;| hCtlFocus, nAt, cItem| cItem &#58;= GetWindowText&#40; &#58;&#58;hWnd &#41;, ; nAt &#58;= &#58;&#58;SendMsg&#40; CB_FINDSTRING, 0, Trim&#40; cItem &#41;&#41; + 1,; Eval&#40; &#58;&#58;bSetGet, cItem &#41;,; &#58;&#58;Select&#40; nAt &#41;,; SetWindowText&#40; &#58;&#58;hWnd, cItem &#41;,; If&#40; &#58;&#58;bValid != nil &#46;and&#46; ; GetParent&#40; hCtlFocus &#41; == GetParent&#40; &#58;&#58;hWnd &#41;,; If&#40; ! Eval&#40; &#58;&#58;bValid &#41;,; PostMessage&#40; &#58;&#58;hWnd, WM_SETFOCUS &#41;,&#41;,&#41; &#125; endif if lDesign &#58;&#58;CheckDots&#40;&#41; endif return Self //----------------------------------------------------------------------------// METHOD ReDefine&#40; nId, bSetGet, aItems, oWnd, nHelpId, bValid, ; bChange, nClrFore, nClrBack, cMsg, lUpdate, ; bWhen, acBitmaps, bDrawItem, nStyle, cPict, ; bEChange &#41; CLASS TComboBox if nClrFore == nil nClrBack &#58;= GetSysColor&#40; COLOR_WINDOW &#41; endif DEFAULT aItems &#58;= &#123;&#125;,; nClrFore &#58;= GetSysColor&#40; COLOR_WINDOWTEXT &#41;,; lUpdate &#58;= &#46;f&#46;, ; nStyle &#58;= CBS_DROPDOWNLIST &#58;&#58;nId = nId &#58;&#58;hWnd = 0 &#58;&#58;aItems = aItems &#58;&#58;bChange = bChange &#58;&#58;bSetGet = bSetGet &#58;&#58;oWnd = oWnd &#58;&#58;nHelpId = nHelpId &#58;&#58;bValid = bValid &#58;&#58;nAt = 0 &#58;&#58;lDrag = &#46;f&#46; &#58;&#58;lCaptured = &#46;f&#46; &#58;&#58;cMsg = cMsg &#58;&#58;lUpdate = lUpdate &#58;&#58;bWhen = bWhen &#58;&#58;bDrawItem = bDrawItem &#58;&#58;nStyle = nStyle if acBitmaps != nil &#58;&#58;SetBitmaps&#40; acBitmaps &#41; else &#58;&#58;lOwnerDraw = &#46;f&#46; endif &#58;&#58;SetColor&#40; nClrFore, nClrBack &#41; if nAnd&#40; &#58;&#58;nStyle, CBS_DROPDOWNLIST &#41; == CBS_DROPDOWN &#58;&#58;oGet &#58;= TGet&#40;&#41;&#58;ReDefine&#40; nil, ; // ID not used &#58;&#58;bSetGet, ; // bSETGET&#40;uVar&#41; Self, ; // oDlg &#58;&#58;nHelpID, ; // Help Context ID cPict, ; // Picture nil, ; // Valid is handled by the CBx &#58;&#58;nClrText,; &#58;&#58;nClrPane,; &#58;&#58;oFont, ; // <oFont> nil, ; // <oCursor> cMsg, ; // cMsg nil, ; // <&#46;update&#46;> nil, ; // <&#123;uWhen&#125;> bEChange, ; // &#123;|nKey,nFlags,Self| <uEChange>&#125; &#46;F&#46; &#41; // <&#46;readonly&#46;> &#41; endif oWnd&#58;DefControl&#40; Self &#41; return Self //----------------------------------------------------------------------------// METHOD Add&#40; cItem, nAt &#41; CLASS TComboBox DEFAULT nAt &#58;= 0 if nAt == 0 AAdd&#40; &#58;&#58;aItems, cItem &#41; else ASize&#40; &#58;&#58;aItems, Len&#40; &#58;&#58;aItems &#41; + 1 &#41; AIns&#40; &#58;&#58;aItems, nAt &#41; &#58;&#58;aItems&#91; nAt &#93; = cItem endif &#58;&#58;SendMsg&#40; CB_ADDSTRING, nAt, FW_AnsiToWide&#40; cItem &#41; &#41; return nil //----------------------------------------------------------------------------// METHOD Change&#40;&#41; CLASS TComboBox local cItem &#58;= GetWindowText&#40; &#58;&#58;hWnd &#41; // Current Value local nAt nAt = &#58;&#58;SendMsg&#40; CB_GETCURSEL &#41; + 1 if nAt == &#58;&#58;nAt &#46;and&#46; ! Empty&#40; Eval&#40; &#58;&#58;bSetGet &#41; &#41; return nil endif &#58;&#58;nAt &#58;= nAt if &#58;&#58;nAt != 0 &#46;and&#46; &#58;&#58;nAt <= Len&#40; &#58;&#58;aItems &#41; if ValType&#40; Eval&#40; &#58;&#58;bSetGet &#41; &#41; == "N" Eval&#40; &#58;&#58;bSetGet, &#58;&#58;nAt &#41; else Eval&#40; &#58;&#58;bSetGet, &#58;&#58;aItems&#91; &#58;&#58;nAt &#93; &#41; endif endif if &#58;&#58;oGet != nil // Always not nil for dropdown &#58;&#58;oGet&#58;VarPut&#40; Eval&#40; &#58;&#58;bSetGet &#41; &#41; // udate variable before calling bChange &#58;&#58;oGet&#58;Refresh&#40;&#41; endif if &#58;&#58;bChange != nil Eval&#40; &#58;&#58;bChange, Self, cItem &#41; endif return nil //----------------------------------------------------------------------------// METHOD DefControl&#40; oControl &#41; CLASS TComboBox if &#58;&#58;aControls == nil &#58;&#58;aControls = &#123;&#125; endif AAdd&#40; &#58;&#58;AControls, oControl &#41; return nil //----------------------------------------------------------------------------// METHOD Set&#40; cNewItem &#41; CLASS TComboBox local nAt if ValType&#40; cNewItem &#41; == "N" nAt = cNewItem if nAt == 0 nAt = 1 endif else nAt = AScan&#40; &#58;&#58;aItems,; &#123; | cItem | Upper&#40; AllTrim&#40; cItem &#41; &#41; == ; Upper&#40; AllTrim&#40; cNewItem &#41; &#41; &#125; &#41; endif if ValType&#40; cNewItem &#41; == "N" &#46;or&#46; nAt != 0 &#58;&#58;Select&#40; nAt &#41; Eval&#40; &#58;&#58;bSetGet, cNewItem &#41; else cNewItem &#58;= cValToChar&#40; cNewItem &#41; Eval&#40; &#58;&#58;bSetGet, cNewItem &#41; SetWindowText&#40; &#58;&#58;hWnd , cNewItem &#41; endif return nil //----------------------------------------------------------------------------// METHOD KeyChar&#40; nKey, nFlags &#41; CLASS TComboBox local lAccept do case case nKey == VK_TAB &#46;or&#46; nKey == VK_RETURN if &#58;&#58;bChange != nil lAccept = Eval&#40; &#58;&#58;bChange, nKey, nFlags, Self &#41; if ValType&#40; lAccept &#41; == "L" &#46;and&#46; lAccept &#58;&#58;oWnd&#58;GoNextCtrl&#40; &#58;&#58;hWnd &#41; endif else &#58;&#58;oWnd&#58;GoNextCtrl&#40; &#58;&#58;hWnd &#41; endif if nKey == VK_RETURN // Execute DEFPUSHBUTTON Action Super&#58;KeyChar&#40; nKey, nFlags &#41; endif return 0 otherwise return Super&#58;KeyChar&#40; nKey, nFlags &#41; endcase return nil //----------------------------------------------------------------------------// METHOD LostFocus&#40;&#41; CLASS TComboBox local nAt &#58;= &#58;&#58;SendMsg&#40; CB_GETCURSEL &#41; Super&#58;LostFocus&#40;&#41; if nAt != CB_ERR &#58;&#58;nAt = nAt + 1 if ValType&#40; Eval&#40; &#58;&#58;bSetGet &#41; &#41; == "N" Eval&#40; &#58;&#58;bSetGet, nAt + 1 &#41; else Eval&#40; &#58;&#58;bSetGet, &#58;&#58;aItems&#91; nAt + 1 &#93; &#41; endif else Eval&#40; &#58;&#58;bSetGet, GetWindowText&#40; &#58;&#58;hWnd &#41; &#41; endif return nil //----------------------------------------------------------------------------// METHOD Modify&#40; cItem, nAt &#41; CLASS TComboBox DEFAULT nAt &#58;= 0 if nAt != 0 &#58;&#58;aItems&#91; nAt &#93; = cItem &#58;&#58;SendMsg&#40; CB_DELETESTRING, nAt - 1 &#41; &#58;&#58;SendMsg&#40; CB_INSERTSTRING, nAt - 1, FW_AnsiToWide&#40; cItem &#41; &#41; endif return nil //----------------------------------------------------------------------------// METHOD Insert&#40; cItem, nAt &#41; CLASS TComboBox DEFAULT nAt &#58;= 0 if nAt != 0 ASize&#40; &#58;&#58;aItems, Len&#40; &#58;&#58;aItems &#41; + 1 &#41; AIns&#40; &#58;&#58;aItems, nAt &#41; &#58;&#58;aItems&#91; nAt &#93; = cItem &#58;&#58;SendMsg&#40; CB_INSERTSTRING, nAt - 1, FW_AnsiToWide&#40; cItem &#41; &#41; endif return nil //----------------------------------------------------------------------------// METHOD Del&#40; nAt &#41; CLASS TComboBox DEFAULT nAt &#58;= 0 if nAt != 0 ADel&#40; &#58;&#58;aItems, nAt &#41; ASize&#40; &#58;&#58;aItems, Len&#40; &#58;&#58;aItems &#41; - 1 &#41; &#58;&#58;SendMsg&#40; CB_DELETESTRING, nAt - 1 &#41; endif return nil //----------------------------------------------------------------------------// METHOD GetDlgCode&#40; nLastKey &#41; CLASS TComboBox if Len&#40; &#58;&#58;oWnd&#58;aControls &#41; == 1 return DLGC_WANTALLKEYS endif &#58;&#58;oWnd&#58;nLastKey = nLastKey return DLGC_WANTALLKEYS //----------------------------------------------------------------------------// METHOD Initiate&#40; hDlg &#41; CLASS TComboBox Super&#58;Initiate&#40; hDlg &#41; &#58;&#58;Default&#40;&#41; if &#58;&#58;oGet != nil &#58;&#58;oGet&#58;hWnd = GetWindow&#40; &#58;&#58;hWnd, GW_CHILD &#41; &#58;&#58;oGet&#58;Link&#40;&#41; &#58;&#58;oGet&#58;bLostFocus = ; &#123;| hCtlFocus, nAt, cItem| cItem &#58;= GetWindowText&#40; &#58;&#58;hWnd &#41;, ; nAt &#58;= &#58;&#58;SendMsg&#40; CB_FINDSTRING, 0, Trim&#40; cItem &#41;&#41; + 1,; Eval&#40; &#58;&#58;bSetGet, cItem &#41;,; &#58;&#58;Select&#40; nAt &#41;,; SetWindowText&#40; &#58;&#58;hWnd, cItem &#41;,; If&#40; &#58;&#58;bValid != nil &#46;and&#46; ; GetParent&#40; hCtlFocus &#41; == GetParent&#40; &#58;&#58;hWnd &#41;,; If&#40; ! Eval&#40; &#58;&#58;bValid &#41;,; PostMessage&#40; &#58;&#58;hWnd, WM_SETFOCUS &#41;,&#41;,&#41; &#125; endif &#58;&#58;Refresh&#40;&#41; return nil //----------------------------------------------------------------------------// METHOD Default&#40;&#41; CLASS TComboBox local cStart &#58;= Eval&#40; &#58;&#58;bSetGet &#41; if ! Empty&#40; &#58;&#58;hWnd &#41; &#46;and&#46; &#58;&#58;nStyle == CBS_DROPDOWNLIST &#58;&#58;nStyle &#58;= GetWindowLong&#40; &#58;&#58;hWnd, GWL_STYLE &#41; endif if Empty&#40; cStart &#41; Eval&#40; &#58;&#58;bSetGet, If&#40; Len&#40; &#58;&#58;aItems &#41; > 0, &#58;&#58;aItems&#91; 1 &#93;, "" &#41; &#41; cStart = If&#40; Len&#40; &#58;&#58;aItems &#41; > 0, &#58;&#58;aItems&#91; 1 &#93;, "" &#41; endif AEval&#40; &#58;&#58;aItems, &#123; | cItem, nAt | &#58;&#58;SendMsg&#40; CB_ADDSTRING, nAt, FW_AnsiToWide&#40; cItem &#41; &#41; &#125; &#41; if ValType&#40; cStart &#41; != "N" &#58;&#58;nAt = AScan&#40; &#58;&#58;aItems, &#123; | cItem | Upper&#40; AllTrim&#40; cItem &#41; &#41; == ; Upper&#40; AllTrim&#40; cStart &#41; &#41; &#125; &#41; else &#58;&#58;nAt = cStart endif &#58;&#58;nAt = If&#40; &#58;&#58;nAt > 0, &#58;&#58;nAt, 1 &#41; if cStart == nil &#58;&#58;Select&#40; &#58;&#58;nAt &#41; else &#58;&#58;Set&#40; cStart &#41; endif return nil //----------------------------------------------------------------------------// METHOD MouseMove&#40; nRow, nCol, nKeyFlags &#41; CLASS TComboBox local nResult &#58;= Super&#58;MouseMove&#40; nRow, nCol, nKeyFlags &#41; return If&#40; &#58;&#58;lDrag, nResult, nil &#41; // We want standard behavior !!! //----------------------------------------------------------------------------// METHOD SetBitmaps&#40; acBitmaps &#41; CLASS TComboBox local n &#58;&#58;lOwnerDraw = &#46;t&#46; if acBitmaps != nil &#58;&#58;aBitmaps = Array&#40; Len&#40; acBitmaps &#41; &#41; for n = 1 to Len&#40; acBitmaps &#41; if File&#40; acBitmaps&#91; n &#93; &#41; &#58;&#58;aBitmaps&#91; n &#93; = ReadBitmap&#40; 0, acBitmaps&#91; n &#93; &#41; else &#58;&#58;aBitmaps&#91; n &#93; = LoadBitmap&#40; GetResources&#40;&#41;, acBitmaps&#91; n &#93; &#41; endif next &#58;&#58;nBmpHeight = nBmpHeight&#40; &#58;&#58;aBitmaps&#91; 1 &#93; &#41; &#58;&#58;nBmpWidth = nBmpWidth&#40; &#58;&#58;aBitmaps&#91; 1 &#93; &#41; endif return nil //----------------------------------------------------------------------------// METHOD Destroy&#40;&#41; CLASS TComboBox local n if &#58;&#58;aBitmaps != nil for n = 1 to Len&#40; &#58;&#58;aBitmaps &#41; DeleteObject&#40; &#58;&#58;aBitmaps&#91; n &#93; &#41; next endif if &#58;&#58;oGet != nil &#58;&#58;oGet&#58;End&#40;&#41; endif return Super&#58;Destroy&#40;&#41; //----------------------------------------------------------------------------// METHOD DrawItem&#40; nIdCtl, nPStruct &#41; CLASS TComboBox return LbxDrawItem&#40; nPStruct, &#58;&#58;aBitmaps, &#58;&#58;aItems, &#58;&#58;nBmpWidth, &#58;&#58;bDrawItem &#41; //----------------------------------------------------------------------------// METHOD VarGet&#40;&#41; CLASS TComboBox local cRet, nAt &#58;= &#58;&#58;SendMsg&#40; CB_GETCURSEL &#41; if nAt != CB_ERR &#58;&#58;nAt = nAt + 1 cRet &#58;= &#58;&#58;aItems&#91; nAt + 1 &#93; else cRet &#58;= GetWindowText&#40; &#58;&#58;hWnd &#41; endif return cRet //----------------------------------------------------------------------------// METHOD lValid&#40;&#41; CLASS TComboBox local lRet &#58;= &#46;t&#46; if ValType&#40; &#58;&#58;bValid &#41; == "B" lRet = Eval&#40; &#58;&#58;bValid, &#58;&#58;oGet &#41; endif return lRet //----------------------------------------------------------------------------// METHOD ShowToolTip&#40;&#41; CLASS TComboBox local nOldBottom nOldBottom = &#58;&#58;nBottom &#58;&#58;nBottom = &#58;&#58;nTop + GetTextHeight&#40; &#58;&#58;hWnd &#41; + 8 Super&#58;ShowToolTip&#40;&#41; &#58;&#58;nBottom = nOldBottom return nil //----------------------------------------------------------------------------// static function IsAppThemed&#40;&#41; return &#46;f&#46; //----------------------------------------------------------------------------// [/code:rar4bpnn]
Combos FWPPC 8.10
Buenas Tardes Antonio, Lo he incluido y al final lo he dejado asi:[code:28a7nwsu] #include "FWCE&#46;ch" #include "FiveWin&#46;ch" #include "Constant&#46;ch" #define GWL_STYLE -16 #define COMBO_BASE 0x140 #define CB_ADDSTRING &#40; COMBO_BASE + 3 &#41; #define CB_DELETESTRING &#40; COMBO_BASE + 4 &#41; #define CB_GETCURSEL &#40; COMBO_BASE + 7 &#41; #define CB_INSERTSTRING &#40; COMBO_BASE + 10 &#41; #define CB_RESETCONTENT &#40; COMBO_BASE + 11 &#41; #define CB_FINDSTRING &#40; COMBO_BASE + 12 &#41; #define CB_SETCURSEL &#40; COMBO_BASE + 14 &#41; #define CB_SHOWDROPDOWN &#40; COMBO_BASE + 15 &#41; #define CB_GETDROPPEDSTATE &#40; COMBO_BASE + 23 &#41; #define CB_ERR -1 #define CB_SETMINVISIBLE 5889 // 0x1701 #define CB_GETMINVISIBLE 5890 // 0x1702 #define SYS_COLOR_INDEX_FLAG 0x40000000 #define COLOR_WINDOW nOr&#40; 5, SYS_COLOR_INDEX_FLAG &#41; #define COLOR_WINDOWTEXT nOr&#40; 8, SYS_COLOR_INDEX_FLAG &#41; #define MB_ICONEXCLAMATION 48 // 0x0030 #define GW_CHILD 5 #define GW_HWNDNEXT 2 //----------------------------------------------------------------------------// function Main&#40;&#41; local oDlg, cValue &#58;="One" DEFINE DIALOG oDlg TITLE "Combos" SIZE 200, 100 @ 1, 1 COMBOBOX cValue ITEMS &#123; "One", "Two", "Three" &#125; OF oDlg ACTIVATE DIALOG oDlg CENTERED return nil CLASS TComboBox FROM TControl DATA aItems, aBitmaps DATA lOwnerDraw, nBmpHeight, nBmpWidth DATA nAt DATA bDrawItem, bCloseUp DATA cError AS String DATA oGet METHOD New&#40; nRow, nCol, bSetGet, aItems, nWidth, nHeight, oWnd, nHelpId,; bChange, bValid, nClrText, nClrBack, lPixel, oFont,; cMsg, lUpdate, bWhen, lDesign, acBitmaps, bDrawItem, nStyle,; cPict, bEChange &#41; CONSTRUCTOR METHOD ReDefine&#40; nId, bSetGet, aItems, oWnd, nHelpId, bValid, ; bChange, nClrText, nClrBack, cMsg, lUpdate,; bWhen, acBitmaps, bDrawItem, nStyle, cPict, bEChange &#41; CONSTRUCTOR METHOD Add&#40; cItem, nAt &#41; METHOD cToChar&#40;&#41; INLINE Super&#58;cToChar&#40; "COMBOBOX" &#41; METHOD Change&#40;&#41; METHOD Close&#40;&#41; INLINE &#58;&#58;SendMsg&#40; CB_SHOWDROPDOWN, 0 &#41; METHOD CloseUp&#40;&#41; INLINE If&#40; &#58;&#58;bCloseUp != nil, Eval&#40; &#58;&#58;bCloseUp, Self &#41;,&#41; METHOD Default&#40;&#41; METHOD DefControl&#40; oControl &#41; METHOD Del&#40; nAt &#41; METHOD Destroy&#40;&#41; METHOD DrawItem&#40; nIdCtl, nPStruct &#41; METHOD FillMeasure&#40; nPInfo &#41; INLINE LbxMeasure&#40; nPInfo, &#58;&#58;nBmpHeight &#41; METHOD FindString&#40; cItem, nFrom &#41; INLINE ; nFrom &#58;= If&#40; nFrom == nil, 0, nFrom &#41;,; &#58;&#58;SendMsg&#40; CB_FINDSTRING, nFrom, cItem &#41; + 1 METHOD Find&#40; cItem, nFrom &#41; INLINE &#58;&#58;FindString&#40; cItem, nFrom &#41; != 0 METHOD GetDlgCode&#40; nLastKey &#41; METHOD GetMinVisible&#40;&#41; INLINE If&#40; IsAppThemed&#40;&#41;, ; &#58;&#58;SendMsg&#40; CB_GETMINVISIBLE, 0, 0 &#41;, 0 &#41; METHOD Initiate&#40; hDlg &#41; METHOD Insert&#40; cItem, nAt &#41; METHOD KeyChar&#40; nKey, nFlags &#41; METHOD LostFocus&#40;&#41; METHOD lValid&#40;&#41; METHOD Modify&#40; cItem, nAt &#41; METHOD MouseMove&#40; nRow, nCol, nKeyFlags &#41; METHOD Open&#40;&#41; INLINE &#58;&#58;SendMsg&#40; CB_SHOWDROPDOWN, 1 &#41; METHOD Refresh&#40;&#41; INLINE &#58;&#58;Set&#40; Eval&#40; &#58;&#58;bSetGet &#41; &#41;, Super&#58;Refresh&#40;&#41; METHOD Reset&#40;&#41; INLINE Eval&#40; &#58;&#58;bSetGet,; If&#40; ValType&#40; Eval&#40; &#58;&#58;bSetGet &#41; &#41; == "N", 0, "" &#41; &#41;,; &#58;&#58;nAt &#58;= 0, &#58;&#58;SendMsg&#40; CB_RESETCONTENT &#41;,; &#58;&#58;Change&#40;&#41; METHOD Select&#40; nItem &#41; INLINE &#58;&#58;nAt &#58;= nItem,; &#58;&#58;SendMsg&#40; CB_SETCURSEL, Max&#40; 0, nItem - 1 &#41;, 0 &#41; METHOD Set&#40; cNewItem &#41; METHOD SetBitmaps&#40; acBitmaps &#41; METHOD SetItems&#40; aItems &#41; INLINE &#58;&#58;Reset&#40;&#41;, &#58;&#58;aItems &#58;= aItems,; &#58;&#58;Default&#40;&#41;, &#58;&#58;Change&#40;&#41; // By default, 30 is the minimum number of visible items in XP Visual Themes #ifndef __CLIPPER__ METHOD SetMinVisible&#40; nItems &#41; INLINE ; If&#40; IsAppThemed&#40;&#41;, &#40; &#58;&#58;SendMsg&#40; CB_SETMINVISIBLE, nItems, 0 &#41; == 1 &#41;, &#46;f&#46; &#41; #endif METHOD ShowToolTip&#40;&#41; METHOD VarGet&#40;&#41; METHOD State&#40;&#41; INLINE &#58;&#58;SendMsg&#40; CB_GETDROPPEDSTATE, 0 &#41; METHOD IsClosed&#40;&#41; INLINE &#58;&#58;State&#40;&#41; == 0 METHOD IsOpen&#40;&#41; INLINE &#58;&#58;State&#40;&#41; == 1 METHOD LButtonDown&#40;&#41; INLINE &#58;&#58;Open&#40;&#41; ENDCLASS //----------------------------------------------------------------------------// METHOD New&#40; nRow, nCol, bSetGet, aItems, nWidth, nHeight, oWnd, nHelpId,; bChange, bValid, nClrFore, nClrBack, lPixel, oFont,; cMsg, lUpdate, bWhen, lDesign, acBitmaps, bDrawItem, nStyle,; cPict, bEChange &#41; CLASS TComboBox if nClrFore == nil nClrBack &#58;= GetSysColor&#40; COLOR_WINDOW &#41; endif DEFAULT nRow &#58;= 0, nCol &#58;= 0, bSetGet &#58;= &#123; || nil &#125;,; oWnd &#58;= GetWndDefault&#40;&#41;,; oFont &#58;= oWnd&#58;oFont,; aItems &#58;= &#123;&#125;, nWidth &#58;= 40, nHeight &#58;= 60,; nClrFore &#58;= GetSysColor&#40; COLOR_WINDOWTEXT &#41;,; lPixel &#58;= &#46;f&#46;, lUpdate &#58;= &#46;f&#46;, lDesign &#58;= &#46;f&#46;,; nStyle &#58;= CBS_DROPDOWNLIST &#58;&#58;cCaption = "" &#58;&#58;nTop = nRow * If&#40; lPixel, 1, CMB_CHARPIX_H &#41; &#58;&#58;nLeft = nCol * If&#40; lPixel, 1, CMB_CHARPIX_W &#41; &#58;&#58;nBottom = &#58;&#58;nTop + nHeight - 1 &#58;&#58;nRight = &#58;&#58;nLeft + nWidth - 1 &#58;&#58;nAt = 0 &#58;&#58;aItems = aItems &#58;&#58;bChange = bChange &#58;&#58;bSetGet = bSetGet &#58;&#58;oWnd = oWnd &#58;&#58;oFont = oFont if acBitmaps != nil &#58;&#58;SetBitmaps&#40; acBitmaps &#41; else &#58;&#58;lOwnerDraw = &#46;f&#46; endif &#58;&#58;nStyle = nOR&#40; If&#40; nStyle == CBS_DROPDOWN, 0, LBS_NOTIFY &#41;, WS_TABSTOP,; nStyle,; LBS_DISABLENOSCROLL, WS_CHILD, WS_VISIBLE, WS_BORDER,; WS_VSCROLL, If&#40; lDesign, WS_CLIPSIBLINGS, 0 &#41;,; If&#40; &#58;&#58;lOwnerDraw, CBS_OWNERDRAWFIXED, 0 &#41; &#41; &#58;&#58;nId = &#58;&#58;GetNewId&#40;&#41; &#58;&#58;nHelpId = nHelpId &#58;&#58;bValid = bValid &#58;&#58;lDrag = lDesign &#58;&#58;lCaptured = &#46;f&#46; &#58;&#58;cMsg = cMsg &#58;&#58;lUpdate = lUpdate &#58;&#58;bWhen = bWhen &#58;&#58;bDrawItem = bDrawItem &#58;&#58;SetColor&#40; nClrFore, nClrBack &#41; if nStyle == CBS_DROPDOWN &#58;&#58;oGet &#58;= TGet&#40;&#41;&#58;ReDefine&#40; nil, ; // ID not used &#58;&#58;bSetGet, ; // bSETGET&#40;uVar&#41; Self, ; // oDlg &#58;&#58;nHelpID, ; // Help Context ID cPict, ; // Picture nil, ; // Valid is handled by the CBx &#58;&#58;nClrText,; &#58;&#58;nClrPane,; &#58;&#58;oFont, ; // <oFont> nil, ; // <oCursor> cMsg, ; // cMsg nil, ; // <&#46;update&#46;> nil, ; // <&#123;uWhen&#125;> bEChange, ; // &#123;|nKey,nFlags,Self| <uEChange>&#125; &#46;F&#46; &#41; // <&#46;readonly&#46;> &#41; endif if ! Empty&#40; oWnd&#58;hWnd &#41; &#58;&#58;Create&#40; "COMBOBOX" &#41; &#58;&#58;nHeight = nHeight &#58;&#58;nWidth = nWidth &#58;&#58;Default&#40;&#41; if oFont != nil &#58;&#58;SetFont&#40; oFont &#41; endif oWnd&#58;AddControl&#40; Self &#41; else oWnd&#58;DefControl&#40; Self &#41; endif if &#58;&#58;oGet != nil &#58;&#58;oGet&#58;hWnd = GetWindow&#40; &#58;&#58;hWnd, GW_CHILD &#41; &#58;&#58;oGet&#58;Link&#40;&#41; &#58;&#58;oGet&#58;bLostFocus = ; &#123;| hCtlFocus, nAt, cItem| cItem &#58;= GetWindowText&#40; &#58;&#58;hWnd &#41;, ; nAt &#58;= &#58;&#58;SendMsg&#40; CB_FINDSTRING, 0, Trim&#40; cItem &#41;&#41; + 1,; Eval&#40; &#58;&#58;bSetGet, cItem &#41;,; &#58;&#58;Select&#40; nAt &#41;,; SetWindowText&#40; &#58;&#58;hWnd, cItem &#41;,; If&#40; &#58;&#58;bValid != nil &#46;and&#46; ; GetParent&#40; hCtlFocus &#41; == GetParent&#40; &#58;&#58;hWnd &#41;,; If&#40; ! Eval&#40; &#58;&#58;bValid &#41;,; PostMessage&#40; &#58;&#58;hWnd, WM_SETFOCUS &#41;,&#41;,&#41; &#125; endif if lDesign &#58;&#58;CheckDots&#40;&#41; endif return Self //----------------------------------------------------------------------------// METHOD ReDefine&#40; nId, bSetGet, aItems, oWnd, nHelpId, bValid, ; bChange, nClrFore, nClrBack, cMsg, lUpdate, ; bWhen, acBitmaps, bDrawItem, nStyle, cPict, ; bEChange &#41; CLASS TComboBox if nClrFore == nil nClrBack &#58;= GetSysColor&#40; COLOR_WINDOW &#41; endif DEFAULT aItems &#58;= &#123;&#125;,; nClrFore &#58;= GetSysColor&#40; COLOR_WINDOWTEXT &#41;,; lUpdate &#58;= &#46;f&#46;, ; nStyle &#58;= CBS_DROPDOWNLIST &#58;&#58;nId = nId &#58;&#58;hWnd = 0 &#58;&#58;aItems = aItems &#58;&#58;bChange = bChange &#58;&#58;bSetGet = bSetGet &#58;&#58;oWnd = oWnd &#58;&#58;nHelpId = nHelpId &#58;&#58;bValid = bValid &#58;&#58;nAt = 0 &#58;&#58;lDrag = &#46;f&#46; &#58;&#58;lCaptured = &#46;f&#46; &#58;&#58;cMsg = cMsg &#58;&#58;lUpdate = lUpdate &#58;&#58;bWhen = bWhen &#58;&#58;bDrawItem = bDrawItem &#58;&#58;nStyle = nStyle if acBitmaps != nil &#58;&#58;SetBitmaps&#40; acBitmaps &#41; else &#58;&#58;lOwnerDraw = &#46;f&#46; endif &#58;&#58;SetColor&#40; nClrFore, nClrBack &#41; if nAnd&#40; &#58;&#58;nStyle, CBS_DROPDOWNLIST &#41; == CBS_DROPDOWN &#58;&#58;oGet &#58;= TGet&#40;&#41;&#58;ReDefine&#40; nil, ; // ID not used &#58;&#58;bSetGet, ; // bSETGET&#40;uVar&#41; Self, ; // oDlg &#58;&#58;nHelpID, ; // Help Context ID cPict, ; // Picture nil, ; // Valid is handled by the CBx &#58;&#58;nClrText,; &#58;&#58;nClrPane,; &#58;&#58;oFont, ; // <oFont> nil, ; // <oCursor> cMsg, ; // cMsg nil, ; // <&#46;update&#46;> nil, ; // <&#123;uWhen&#125;> bEChange, ; // &#123;|nKey,nFlags,Self| <uEChange>&#125; &#46;F&#46; &#41; // <&#46;readonly&#46;> &#41; endif oWnd&#58;DefControl&#40; Self &#41; return Self //----------------------------------------------------------------------------// METHOD Add&#40; cItem, nAt &#41; CLASS TComboBox DEFAULT nAt &#58;= 0 if nAt == 0 AAdd&#40; &#58;&#58;aItems, cItem &#41; else ASize&#40; &#58;&#58;aItems, Len&#40; &#58;&#58;aItems &#41; + 1 &#41; AIns&#40; &#58;&#58;aItems, nAt &#41; &#58;&#58;aItems&#91; nAt &#93; = cItem endif &#58;&#58;SendMsg&#40; CB_ADDSTRING, nAt, Ansitowide&#40; cItem &#41; &#41; return nil //----------------------------------------------------------------------------// METHOD Change&#40;&#41; CLASS TComboBox local cItem &#58;= GetWindowText&#40; &#58;&#58;hWnd &#41; // Current Value local nAt nAt = &#58;&#58;SendMsg&#40; CB_GETCURSEL &#41; + 1 if nAt == &#58;&#58;nAt &#46;and&#46; ! Empty&#40; Eval&#40; &#58;&#58;bSetGet &#41; &#41; return nil endif &#58;&#58;nAt &#58;= nAt if &#58;&#58;nAt != 0 &#46;and&#46; &#58;&#58;nAt <= Len&#40; &#58;&#58;aItems &#41; if ValType&#40; Eval&#40; &#58;&#58;bSetGet &#41; &#41; == "N" Eval&#40; &#58;&#58;bSetGet, &#58;&#58;nAt &#41; else Eval&#40; &#58;&#58;bSetGet, &#58;&#58;aItems&#91; &#58;&#58;nAt &#93; &#41; endif endif if &#58;&#58;oGet != nil // Always not nil for dropdown &#58;&#58;oGet&#58;VarPut&#40; Eval&#40; &#58;&#58;bSetGet &#41; &#41; // udate variable before calling bChange &#58;&#58;oGet&#58;Refresh&#40;&#41; endif if &#58;&#58;bChange != nil Eval&#40; &#58;&#58;bChange, Self, cItem &#41; endif return nil //----------------------------------------------------------------------------// METHOD DefControl&#40; oControl &#41; CLASS TComboBox if &#58;&#58;aControls == nil &#58;&#58;aControls = &#123;&#125; endif AAdd&#40; &#58;&#58;AControls, oControl &#41; return nil //----------------------------------------------------------------------------// METHOD Set&#40; cNewItem &#41; CLASS TComboBox local nAt if ValType&#40; cNewItem &#41; == "N" nAt = cNewItem if nAt == 0 nAt = 1 endif else nAt = AScan&#40; &#58;&#58;aItems,; &#123; | cItem | Upper&#40; AllTrim&#40; cItem &#41; &#41; == ; Upper&#40; AllTrim&#40; cNewItem &#41; &#41; &#125; &#41; endif if ValType&#40; cNewItem &#41; == "N" &#46;or&#46; nAt != 0 &#58;&#58;Select&#40; nAt &#41; Eval&#40; &#58;&#58;bSetGet, cNewItem &#41; else cNewItem &#58;= cValToChar&#40; cNewItem &#41; Eval&#40; &#58;&#58;bSetGet, cNewItem &#41; SetWindowText&#40; &#58;&#58;hWnd , cNewItem &#41; endif return nil //----------------------------------------------------------------------------// METHOD KeyChar&#40; nKey, nFlags &#41; CLASS TComboBox local lAccept do case case nKey == VK_TAB &#46;or&#46; nKey == VK_RETURN if &#58;&#58;bChange != nil lAccept = Eval&#40; &#58;&#58;bChange, nKey, nFlags, Self &#41; if ValType&#40; lAccept &#41; == "L" &#46;and&#46; lAccept &#58;&#58;oWnd&#58;GoNextCtrl&#40; &#58;&#58;hWnd &#41; endif else &#58;&#58;oWnd&#58;GoNextCtrl&#40; &#58;&#58;hWnd &#41; endif if nKey == VK_RETURN // Execute DEFPUSHBUTTON Action Super&#58;KeyChar&#40; nKey, nFlags &#41; endif return 0 otherwise return Super&#58;KeyChar&#40; nKey, nFlags &#41; endcase return nil //----------------------------------------------------------------------------// METHOD LostFocus&#40;&#41; CLASS TComboBox local nAt &#58;= &#58;&#58;SendMsg&#40; CB_GETCURSEL &#41; Super&#58;LostFocus&#40;&#41; if nAt != CB_ERR &#58;&#58;nAt = nAt + 1 if ValType&#40; Eval&#40; &#58;&#58;bSetGet &#41; &#41; == "N" Eval&#40; &#58;&#58;bSetGet, nAt + 1 &#41; else Eval&#40; &#58;&#58;bSetGet, &#58;&#58;aItems&#91; nAt + 1 &#93; &#41; endif else Eval&#40; &#58;&#58;bSetGet, GetWindowText&#40; &#58;&#58;hWnd &#41; &#41; endif return nil //----------------------------------------------------------------------------// METHOD Modify&#40; cItem, nAt &#41; CLASS TComboBox DEFAULT nAt &#58;= 0 if nAt != 0 &#58;&#58;aItems&#91; nAt &#93; = cItem &#58;&#58;SendMsg&#40; CB_DELETESTRING, nAt - 1 &#41; &#58;&#58;SendMsg&#40; CB_INSERTSTRING, nAt - 1, ansitowide&#40; cItem &#41; &#41; endif return nil //----------------------------------------------------------------------------// METHOD Insert&#40; cItem, nAt &#41; CLASS TComboBox DEFAULT nAt &#58;= 0 if nAt != 0 ASize&#40; &#58;&#58;aItems, Len&#40; &#58;&#58;aItems &#41; + 1 &#41; AIns&#40; &#58;&#58;aItems, nAt &#41; &#58;&#58;aItems&#91; nAt &#93; = cItem &#58;&#58;SendMsg&#40; CB_INSERTSTRING, nAt - 1, ansitowide&#40; cItem &#41; &#41; endif return nil //----------------------------------------------------------------------------// METHOD Del&#40; nAt &#41; CLASS TComboBox DEFAULT nAt &#58;= 0 if nAt != 0 ADel&#40; &#58;&#58;aItems, nAt &#41; ASize&#40; &#58;&#58;aItems, Len&#40; &#58;&#58;aItems &#41; - 1 &#41; &#58;&#58;SendMsg&#40; CB_DELETESTRING, nAt - 1 &#41; endif return nil //----------------------------------------------------------------------------// METHOD GetDlgCode&#40; nLastKey &#41; CLASS TComboBox if Len&#40; &#58;&#58;oWnd&#58;aControls &#41; == 1 return DLGC_WANTALLKEYS endif &#58;&#58;oWnd&#58;nLastKey = nLastKey return DLGC_WANTALLKEYS //----------------------------------------------------------------------------// METHOD Initiate&#40; hDlg &#41; CLASS TComboBox Super&#58;Initiate&#40; hDlg &#41; &#58;&#58;Default&#40;&#41; if &#58;&#58;oGet != nil &#58;&#58;oGet&#58;hWnd = GetWindow&#40; &#58;&#58;hWnd, GW_CHILD &#41; &#58;&#58;oGet&#58;Link&#40;&#41; &#58;&#58;oGet&#58;bLostFocus = ; &#123;| hCtlFocus, nAt, cItem| cItem &#58;= GetWindowText&#40; &#58;&#58;hWnd &#41;, ; nAt &#58;= &#58;&#58;SendMsg&#40; CB_FINDSTRING, 0, Trim&#40; cItem &#41;&#41; + 1,; Eval&#40; &#58;&#58;bSetGet, cItem &#41;,; &#58;&#58;Select&#40; nAt &#41;,; SetWindowText&#40; &#58;&#58;hWnd, cItem &#41;,; If&#40; &#58;&#58;bValid != nil &#46;and&#46; ; GetParent&#40; hCtlFocus &#41; == GetParent&#40; &#58;&#58;hWnd &#41;,; If&#40; ! Eval&#40; &#58;&#58;bValid &#41;,; PostMessage&#40; &#58;&#58;hWnd, WM_SETFOCUS &#41;,&#41;,&#41; &#125; endif &#58;&#58;Refresh&#40;&#41; return nil //----------------------------------------------------------------------------// METHOD Default&#40;&#41; CLASS TComboBox local cStart &#58;= Eval&#40; &#58;&#58;bSetGet &#41; if ! Empty&#40; &#58;&#58;hWnd &#41; &#46;and&#46; &#58;&#58;nStyle == CBS_DROPDOWNLIST &#58;&#58;nStyle &#58;= GetWindowLong&#40; &#58;&#58;hWnd, GWL_STYLE &#41; endif if Empty&#40; cStart &#41; Eval&#40; &#58;&#58;bSetGet, If&#40; Len&#40; &#58;&#58;aItems &#41; > 0, &#58;&#58;aItems&#91; 1 &#93;, "" &#41; &#41; cStart = If&#40; Len&#40; &#58;&#58;aItems &#41; > 0, &#58;&#58;aItems&#91; 1 &#93;, "" &#41; endif AEval&#40; &#58;&#58;aItems, &#123; | cItem, nAt | &#58;&#58;SendMsg&#40; CB_ADDSTRING, nAt, ansitowide&#40; cItem &#41; &#41; &#125; &#41; if ValType&#40; cStart &#41; != "N" &#58;&#58;nAt = AScan&#40; &#58;&#58;aItems, &#123; | cItem | Upper&#40; AllTrim&#40; cItem &#41; &#41; == ; Upper&#40; AllTrim&#40; cStart &#41; &#41; &#125; &#41; else &#58;&#58;nAt = cStart endif &#58;&#58;nAt = If&#40; &#58;&#58;nAt > 0, &#58;&#58;nAt, 1 &#41; if cStart == nil &#58;&#58;Select&#40; &#58;&#58;nAt &#41; else &#58;&#58;Set&#40; cStart &#41; endif return nil //----------------------------------------------------------------------------// METHOD MouseMove&#40; nRow, nCol, nKeyFlags &#41; CLASS TComboBox local nResult &#58;= Super&#58;MouseMove&#40; nRow, nCol, nKeyFlags &#41; return If&#40; &#58;&#58;lDrag, nResult, nil &#41; // We want standard behavior !!! //----------------------------------------------------------------------------// METHOD SetBitmaps&#40; acBitmaps &#41; CLASS TComboBox local n &#58;&#58;lOwnerDraw = &#46;t&#46; if acBitmaps != nil &#58;&#58;aBitmaps = Array&#40; Len&#40; acBitmaps &#41; &#41; for n = 1 to Len&#40; acBitmaps &#41; if File&#40; acBitmaps&#91; n &#93; &#41; &#58;&#58;aBitmaps&#91; n &#93; = ReadBitmap&#40; 0, acBitmaps&#91; n &#93; &#41; else &#58;&#58;aBitmaps&#91; n &#93; = LoadBitmap&#40; GetResources&#40;&#41;, acBitmaps&#91; n &#93; &#41; endif next &#58;&#58;nBmpHeight = nBmpHeight&#40; &#58;&#58;aBitmaps&#91; 1 &#93; &#41; &#58;&#58;nBmpWidth = nBmpWidth&#40; &#58;&#58;aBitmaps&#91; 1 &#93; &#41; endif return nil //----------------------------------------------------------------------------// METHOD Destroy&#40;&#41; CLASS TComboBox local n if &#58;&#58;aBitmaps != nil for n = 1 to Len&#40; &#58;&#58;aBitmaps &#41; DeleteObject&#40; &#58;&#58;aBitmaps&#91; n &#93; &#41; next endif if &#58;&#58;oGet != nil &#58;&#58;oGet&#58;End&#40;&#41; endif return Super&#58;Destroy&#40;&#41; //----------------------------------------------------------------------------// METHOD DrawItem&#40; nIdCtl, nPStruct &#41; CLASS TComboBox return LbxDrawItem&#40; nPStruct, &#58;&#58;aBitmaps, &#58;&#58;aItems, &#58;&#58;nBmpWidth, &#58;&#58;bDrawItem &#41; //----------------------------------------------------------------------------// METHOD VarGet&#40;&#41; CLASS TComboBox local cRet, nAt &#58;= &#58;&#58;SendMsg&#40; CB_GETCURSEL &#41; if nAt != CB_ERR &#58;&#58;nAt = nAt + 1 cRet &#58;= &#58;&#58;aItems&#91; nAt + 1 &#93; else cRet &#58;= GetWindowText&#40; &#58;&#58;hWnd &#41; endif return cRet //----------------------------------------------------------------------------// METHOD lValid&#40;&#41; CLASS TComboBox local lRet &#58;= &#46;t&#46; if ValType&#40; &#58;&#58;bValid &#41; == "B" lRet = Eval&#40; &#58;&#58;bValid, &#58;&#58;oGet &#41; endif return lRet //----------------------------------------------------------------------------// METHOD ShowToolTip&#40;&#41; CLASS TComboBox local nOldBottom nOldBottom = &#58;&#58;nBottom &#58;&#58;nBottom = &#58;&#58;nTop + GetTextHeight&#40; &#58;&#58;hWnd &#41; + 8 Super&#58;ShowToolTip&#40;&#41; &#58;&#58;nBottom = nOldBottom return nil //----------------------------------------------------------------------------// static function IsAppThemed&#40;&#41; return &#46;f&#46; [/code:28a7nwsu]Lo unico que he modificado es que la función FW_ANSITOWIDE no la encontraba y la he sustituido por ANSITOWIDE.De esta forma, la unica diferencia que veo con antes (aunque he visto que la clase internamente tiene varios cambios) es que sale por defecto en azul el combo y que se expande menos posiciones.Muchas Gracias
Combos FWPPC 8.10
Mike,El tamano lo puedes establecer con:@ ..., ... COMBOBOX ... SIZE nAncho, nAltoEntonces, te ha funcionado bien ?
Combos FWPPC 8.10
Ya hize los cambios y lo curioso es que algunos combos si los abre y otros no. Veo en el foro que han tenido problemas con los combos y el nuevo windows mobile 6.1 Por eso preguntaba si alguien tiene el último build y el windows mobile. Que pueda decirme si los combos funcionan correctamente. Gracias Fernando
Combox . modificación de combobox
Hola amigos, He modificado algo a la combobox nativa de FWH, para hacer algo de busqueda incremental. Hasta el momento lo catalogo como semi-incremental. dejo el link de descarga. El ejemplo es el 2 combo del ejemplo, viene un arreglo teniendo items del uno al quince. en el segundo combo, ustedes teclean "cat" por ejemplo y aparece la primera aparicion en la lista, es decir, "catorce" saludos, falta hacer el salto en la lista desplergada para que fuese incremental totalmente, toda la ayuda y/o comentarios son bienvenidos. [url:3hfbw1gf]http&#58;//www&#46;uploading&#46;com/files/RVUHWP2J/combox&#46;rar&#46;html[/url:3hfbw1gf] william morales
Combox . modificación de combobox
William, La actual clase TComboBox de FWH proporciona búsqueda incremental
Combox . modificación de combobox
[quote="Antonio Linares":1m3j99d0]William, La actual clase TComboBox de FWH proporciona búsqueda incremental[/quote:1m3j99d0] Algun ejemplito? gracias
Combox . modificación de combobox
William, Desde FWH 7.01 está disponible. Puedes usar cualquier combobox y comenzar a teclear los caracteres de un item, y la búsqueda incremental lo localiza
Combox . modificación de combobox
Antonio una consulta con respecto al combobox, estoy tratando de que quede lo mas amigable posible, en la version de 16 bits cuando seleccionaba datos en el combobox para modificar de una opcion a otra solo bastaba con tocar el mouse en cualquier parte de la pantalla y quedaba seleccionado la opcion digitada, porque ahora en la 7.01 si no le presionas el enter no lo asigna cuando estas modificando si no que deja el dato antiguo gracias
Combox Enlasados
Estimados Como puedo enlasar 2 o mas combox La idea es según el contenido que se seleccione en un Combox se me actualice el siguiente Combox, en base a una funcion que hace dicha actualizacion don los datos salen del primer Combox mmm fui claro muchas gracias David Argentina
Combox Enlasados
Aca paso la rutina [code=fw:1kvvsrra]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp;@ &nbsp;<span style="color: #000000;">1</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">COMBOBOX</span> oCbx_001 <span style="color: #0000ff;">VAR</span> cCbx_001 <span style="color: #0000ff;">PROMPTS</span> mCbx_001 ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">STYLE</span> CBS_DROPDOWN ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">40</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">&#40;</span> mCbx_002:=ArmaTipoDocu<span style="color: #000000;">&#40;</span>VAL<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">substr</span><span style="color: #000000;">&#40;</span>cCbx_001,<span style="color: #000000;">201</span>,<span style="color: #000000;">18</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cCbx_002:=mCbx_002<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oCbx_002:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">VALID</span> &nbsp; &nbsp; <span style="color: #000000;">&#40;</span> mCbx_002:=ArmaTipoDocu<span style="color: #000000;">&#40;</span>VAL<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">substr</span><span style="color: #000000;">&#40;</span>cCbx_001,<span style="color: #000000;">201</span>,<span style="color: #000000;">18</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cCbx_002:=mCbx_002<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oCbx_002:<span style="color: #0000ff;">refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> , .T. <span style="color: #000000;">&#41;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">Of</span> oDlgCar<br /><br />&nbsp; @ &nbsp;<span style="color: #000000;">2</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">COMBOBOX</span> oCbx_002 <span style="color: #0000ff;">VAR</span> cCbx_002 <span style="color: #0000ff;">PROMPTS</span> mCbx_002 <span style="color: #0000ff;">UPDATE</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">40</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">Of</span> oDlgCar</div>[/code:1kvvsrra] la variable mCbx_002 la actualizo con los Items que debo mostrar en el segundo COMBOX. Haciendo control dicha variable se Actualiza pero NO se muestra en el 2° COMBOX David Argetnina
Combox Enlasados
use los methodos para reasignar items SetItems( aItems, aList ) salu2
Combox Enlasados
Hola estimados... Como me sujeris hacerlo ? David
Combox Enlasados
Amigo prueba asi REDEFINE COMBOBOX aGetS[12] VAR fpago ITEMS forpago ID 112 OF oDlg; ON CHANGE (CargaFormaPago(oDlg,@acDevuelve,fpago,aGets,nTotTot),aGetS[13]:SetItems(acDevuelve),aGets[13]:SetFocus(),xpagar:=0) UPDATE REDEFINE COMBOBOX aGetS[13] VAR FPagar ITEMS acDevuelve ID 113 OF oDlg; ON CHANGE (aGets[40]:Refresh(),aGets[35]:SetFocus(),Refrpago(fPagar,aGets,nTotTot) ) UPDATE Saludos
Combox Enlasados
Hola David: [quote="dobfivewin":233m4ata]La idea es según el contenido que se seleccione en un Combox se me actualice el siguiente Combox, en base a una funcion que hace dicha actualizacion don los datos salen del primer Combox[/quote:233m4ata] Aquí tienes un pequeño ejemplo funcional: [code=fw:233m4ata]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><span style="color: #00C800;">Function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">Local</span> oDlg, nVar, nVar1, aCbx<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>, ;<br />         aArr := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Uno"</span>, <span style="color: #ff0000;">"Dos"</span>, <span style="color: #ff0000;">"Tres"</span> <span style="color: #000000;">&#125;</span>, ;<br />         aUno := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Uno Uno"</span>, <span style="color: #ff0000;">"Uno Dos"</span>, <span style="color: #ff0000;">"Uno Tres"</span> <span style="color: #000000;">&#125;</span>, ;<br />         aDos := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Dos Uno"</span>, <span style="color: #ff0000;">"Dos Dos"</span>, <span style="color: #ff0000;">"Dos Tres"</span> <span style="color: #000000;">&#125;</span>, ;<br />         aTres := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Tres Uno"</span>, <span style="color: #ff0000;">"Tres Dos"</span>, <span style="color: #ff0000;">"Tres Tres"</span> <span style="color: #000000;">&#125;</span><br /><br />   nVar := nVar1 := <span style="color: #000000;">1</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">200</span>, <span style="color: #000000;">200</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Combos Enlazados"</span><br /><br />   @ <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">COMBOBOX</span> aCbx<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> nVar <span style="color: #0000ff;">ITEMS</span> aArr <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">90</span> <span style="color: #0000ff;">PIXEL</span> ;<br />            <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> aCbx<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">SetItems</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nVar == <span style="color: #000000;">1</span>, aUno, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nVar == <span style="color: #000000;">2</span>, aDos, aTres <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   @ <span style="color: #000000;">10</span>, <span style="color: #000000;">50</span> <span style="color: #0000ff;">COMBOBOX</span> aCbx<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> nVar1 <span style="color: #0000ff;">ITEMS</span> aUno <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>, <span style="color: #000000;">90</span> <span style="color: #0000ff;">PIXEL</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">Nil</span></div>[/code:233m4ata] Un abrazo. Manuel Mercado
Combox Enlasados
Estimados Carlos Vargas, jbrito y Manuel Mercado MUCHAS GRACIAS Me solucionaron el problema. 1000000 de gracias david argentina
Combox Enlasados
Manuel Saludo Cordial Serias tan amable y me explicas como con tu ejemplo lo hago desde DBFs Gracias Manuel Un Abrazo Jairo Barbosa
Combox and escape
Hello, I have 3 combo in a dialog . When the user select a combo to view all the items and then press Esc, all the dialog is closed and not only the combo list . How to close only the combo List ?? REDEFINE COMBOBOX oCb8 VAR wG[36] ITEMS VPROBA ; STYLE CBS_DROPDOWN ; COLOR "B*/W+" ; ID 131 OF oDlgrv
Combox and escape
Dear Mr.Jack, Which FWH version do you use?. This problem is fixed in FWH 8.12 [quote:yhct8q02]* New: Class TComboBox Method KeyDown(). An open combobox on a dialog will properly close when Escape is pressed and the dialog will not be closed. [/quote:yhct8q02] Regards Anser
Combox and escape
Thanks for this help, I is working . Thanks !
Combox con 2 columnas
Amigos....Se pude armar un Combox donde se visualizan 2 columans en la fila??Chas graciasDbarrioArgentina
Combox con 2 columnas
puedes probar con [url:11bh4w9x]ftp&#58;//ftp&#46;quiquesoft&#46;com/fivewin/qcombrow&#46;zip[/url:11bh4w9x] tal vez te ayude
Come beccare i messaggi da un file DBX di Outlook Express
Ciao a tutti, mi occorrerebbe un'idea (se esiste) x prelevare singolarmente e in automatico i messaggi da un file DBX di Outlook Express x poterli processare poi. C'e' qualcosa che posso usare/utilizzare ? Grazie
Come beccare i messaggi da un file DBX di Outlook Express
Ho sbagliato a porre qui la domanda,.....scusate
Come beccare i messaggi da un file DBX di Outlook Express
Ciao a tutti, mi occorrerebbe un'idea (se esiste) x prelevare singolarmente e in automatico i messaggi da un file DBX di Outlook Express x poterli processare poi. C'e' qualcosa che posso usare/utilizzare ? Grazie Ho prima postato questa richiesta sul forum internazionale poi mi sono accorto che EMG aveva gia' risposto ad un quesito similare (almeno mi pareva)
Come beccare i messaggi da un file DBX di Outlook Express
Sì, puoi usare, appunto, OLE: [code:2wht0f9b]#define olFolderInbox 6 FUNCTION MAIN&#40;&#41; LOCAL oOutlook &#58;= CREATEOBJECT&#40; "Outlook&#46;Application" &#41; LOCAL oNameSpace &#58;= oOutlook&#58;GetNameSpace&#40;"MAPI"&#41; LOCAL oInbox &#58;= oNameSpace&#58;GetDefaultFolder&#40; olFolderInbox &#41; LOCAL i FOR i = 1 TO oInbox&#58;Items&#58;Count ? oInbox&#58;Items&#91; i &#93;&#58;Body ? NEXT oOutlook&#58;Quit&#40;&#41; INKEY&#40; 0 &#41; RETURN NIL[/code:2wht0f9b] EMG
Come beccare i messaggi da un file DBX di Outlook Express
Ho provato il seg. esempio: ************************* #include "FiveWin.ch" #define olFolderInbox 6 FUNCTION MAIN() LOCAL oOutlook := CREATEOBJECT( "Outlook.Application" ) LOCAL oNameSpace := oOutlook:GetNameSpace("MAPI") LOCAL oInbox := oNameSpace:GetDefaultFolder( olFolderInbox ) LOCAL i FOR i = 1 TO oInbox:Items:Count ? oInbox:Items[ i ]:Body ? NEXT oOutlook:Quit() INKEY( 0 ) return nil ****************** con FWH24 e mi fa partire intanto il Microsoft Outlook (ma io i messaggi ce l'ho in OutLook Express) ma subito mi da il seg errore: Class: NIL has no exported method: BODY Posso fare qualcosa ? Ma sopratutto posso leggere i Body (e magari anche gli eventuali codici di errore delle email, es: email non esistente,spazio esaurito,ecc) e io poi uso Outlook Express. Grazie
Come beccare i messaggi da un file DBX di Outlook Express
Mi era sfuggito il fatto che tu parlavi di Outlook Express. OLE può essere utilizzato solo con Outlook di Office. Non ho nessuna idea su come fare quello che chiedi con OE. EMG
Come beccare i messaggi da un file DBX di Outlook Express
Ok, vorra' dire che passo a Microsoft Outlook. Si riesce in questo caso a fare funzionare l'esempio sopre che mi hai mandato oppure ho bisogno di qualche libreria o aggiornamento delle mie FWH24 ? Grazie
Come beccare i messaggi da un file DBX di Outlook Express
Non fa niente <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Come beccare i messaggi da un file DBX di Outlook Express
Forse partendo da questo esempio trovat nelne news si riesce a risolvere il mio problema: Code: oOL := TOleAuto():New( "Outlook.Application" ) lOutlookOK := .T. IF ! lOutlookOK RETURN ( 0 ) ENDIF oNameSpace = oOL:Get( "GetNameSpace", "MAPI" ) oContacts = oNameSpace:Get( "GetDefaultFolder", "6" ) // 6 = Inbox-Folder FOR nContador = 1 TO oContacts:ITEMS:Count() oNewContact = oContacts:ITEMS( nContador ) cSenderName := oNewContact:get( "SenderName" ) cSubject := oNewContact:get( "Subject" ) cBody := oNewContact:get( "Body" ) && questo l'ho inserito io grazie al tuo sempio e funziona * quali sono tutte le altre informazioni che posso beccare ? * ho provato a cercare nel web e nel mio pc il file: VBAOUTL?.CHM che mi poteva aiutare ma.... non ho trovato niente, per la verita' mi occorrerebbe qualche codice di risposta della email del tipo Non esestente,spazio email insuff, ecc... NEXT nContador RETURN NIL Ci siamo quasi, un ultimo sforzo Grazie
Come beccare i messaggi da un file DBX di Outlook Express
[quote="Romeo":yfzewxez]Ok, vorra' dire che passo a Microsoft Outlook. Si riesce in questo caso a fare funzionare l'esempio sopre che mi hai mandato oppure ho bisogno di qualche libreria o aggiornamento delle mie FWH24 ? Grazie[/quote:yfzewxez] Sì, dovrebbe funzionare regolarmente. EMG
Come beccare i messaggi da un file DBX di Outlook Express
Non capisco cosa ti serve. Se il mio esempio ti funziona credo che tu non abbia bisogno di altro. EMG
Come beccare i messaggi da un file DBX di Outlook Express
Ok l'esempio va bene e mi chiedevo se oltre al Body, posso avere anche altre variabili, ese: email di chi mi risponde, il codice di errore (se esiste). certo potrei farlo analizzando riga x riga il body...ma se esistono le funzioni gia fatte e' meglio. Il progrmma che devo relizzare dovra' mandare delle email (tantissime) e poi analizzare le risposte in maniera piu' automatico possibile. Grazie
Come beccare i messaggi da un file DBX di Outlook Express
Cerca l'oggetto MailItem sulla documentazione e troverai tutte le sue proprietà disponibili. EMG
Come beccare i messaggi da un file DBX di Outlook Express
Ho cercato nelle cartelle e sottocartelle di fwh24 e nelle classi ma non ho trovato alcun riferimento a menuitem. Forse ho una versione datata? (FWH24) Grazie
Come beccare i messaggi da un file DBX di Outlook Express
Ops, chiaramento cercato Mailitem Mi viene un dubbio che io debba cercare nella documentazione del file VBAOUTL*.CHM di microsoft che io non ho !! Romeo
Come beccare i messaggi da un file DBX di Outlook Express
FWH non c'entra niente. Devi cercare nella documentazione di Outlook (VBAOUTL*.CHM). EMG
Come beccare i messaggi da un file DBX di Outlook Express
[quote="Romeo":2zkqw394]Ops, chiaramento cercato Mailitem Mi viene un dubbio che io debba cercare nella documentazione del file VBAOUTL*.CHM di microsoft che io non ho !! Romeo[/quote:2zkqw394] Infatti. Ma se hai installato Office ce l'hai certamente, se non sull'hard disk sicuramente sul CD. EMG
Come beccare i messaggi da un file DBX di Outlook Express
Ho il cd rom di Office XP 2002 e non ho trovato il fiel VBAOUTL9.CHM ma l'ho trovato su office 97. Ho provato a guardare Mailitem ma dopo un po di tentativi ho rinunciato a cercare le altre funzioni poiche' non le trovo, sicuramente ci sono ma non risco a trovarle! Grazie comunque Romeo
Come beccare i messaggi da un file DBX di Outlook Express
[quote="Romeo":2hsoz80x]Ho il cd rom di Office XP 2002 e non ho trovato il fiel VBAOUTL9.CHM[/quote:2hsoz80x] Infatti devi cercare VBAOUTL*.CHM. [quote="Romeo":2hsoz80x]Ho provato a guardare Mailitem ma dopo un po di tentativi ho rinunciato a cercare le altre funzioni poiche' non le trovo, sicuramente ci sono ma non risco a trovarle![/quote:2hsoz80x] Hai trovato l'oggetto MailItem? Ecco, in alto trovi il link Proprietà. Clickalo e verranno fuori tutte le proprietà di quell'oggetto, tipo Body, etc. Non mi pare così difficile. Alla peggio cerca su Internet. EMG
Come beccare i messaggi da un file DBX di Outlook Express
si grazie, ho trovato qualcosa che mi interessa su MSDN
Come inserire una immagine in un post
Ciao a tutti Ho provato ad inserire un'immagine per rendere evidente un difetto, ho usato il TAG Img ma non ci sono riuscito. Vorrei un chiarimento in merito. Grazie Maurizio Menabue
Come inserire una immagine in un post
<!-- m --><a class="postlink" href="https://postimages.org/">https://postimages.org/</a><!-- m --> quando la carichi devi selezionare il secondo [img:xt135p69]https&#58;//i&#46;postimg&#46;cc/13jsHxs9/kkkkkkkkkkkkkkkkkkkk&#46;jpg[/img:xt135p69]
Come leggere i files Help con Vista
Salve, ho un PC con vista e non riesco a leggere/visualizzare i files di Help (.hlp) di Fivewin/Harbour. Come posso fare ? Grazie e Auguri a tutti Romeo/Zingoni
Come leggere i files Help con Vista
Nella cartella manual delle FWH trovi anche i file CHM. EMG
Come leggere i files Help con Vista
Romeo, potresti installare il programma di windows per leggere i files .hlp, quando cerchi di aprire un hlp su vista ti apare l'aiuto e ti dice da dove scaricare questo programma. comunque, questo è il link. <!-- m --><a class="postlink" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=6ebcfad9-d3f5-4365-8070-334cd175d4bb&displaylang=en">http://www.microsoft.com/downloads/deta ... laylang=en</a><!-- m --> ciao
Come leggere i files Help con Vista
OK, grazie mille, risolto con il download del file linkato.
Come leggere i files Help con Vista
Scusa, giusto per curiosità: perché non puoi utilizzare i file CHM forniti con le FWH? EMG
Come leggere i files Help con Vista
Scusa, non ti ho risposto perche' non ho piu' letto i messaggi. COmunque, pare strano, ma in alcune versioni di fwin (es 1.95) non TROVO i files CHM, mentre ci sono sempre i .HLP. CIao
Come leggere i files Help con Vista
1.95??? Spero tu abbia sbagliato a scrivere! Non ti pare un po' vecchiotta? Forse a quell'epoca neanche esistevano i CHM. EMG
Come reperire il nome oggetto 'constraint'
Ciao a tutti Non riesco a sapere il modo per leggere il nome dell'oggetto creato con la clausola constraint associato ad una certa colonna in MSSQL sia utilizzanto un comando SQl o una qualche proprietà legata alla colonna es.: cNameContraist := oRs:fields( cNameField ):constraint() mi serve per poter poi scrivere : [code=fw:1ww74bx7]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cSql := <span style="color: #ff0000;">"ALTER TABLE "</span> + cNameTable<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cSql += <span style="color: #ff0000;">" DROP CONSTRAINT IF EXISTS"</span> + <span style="color: #ff0000;">" ["</span> + cNameConstraint + <span style="color: #ff0000;">"] ;"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oCn:<span style="color: #000000;">Execute</span><span style="color: #000000;">&#40;</span> cSql <span style="color: #000000;">&#41;</span><br />&nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cSql := <span style="color: #ff0000;">"ALTER TABLE "</span> + cNameTable<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cSql += <span style="color: #ff0000;">" DROP COLUMN"</span> + <span style="color: #ff0000;">" ["</span> + cNameField + <span style="color: #ff0000;">"] ;"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oCn:<span style="color: #000000;">Execute</span><span style="color: #000000;">&#40;</span> cSql <span style="color: #000000;">&#41;</span><br /><br />&nbsp;</div>[/code:1ww74bx7] Grazie !
Comentario sobre una busqueda...
Hola a todos... Lo que pretendo es que al introducir un código me realice una búsqueda en la tabla de articulos y me muestre el nombre de este y la cantidad. El codigo que estoy usando es el siguiente... Alguien podría decirme si este codigo está mal? ..... DEFINE FONT oFont NAME "Courier New" SIZE 6, -14 odlg:bKeyChar = { | nKey, nFlags | Search_art(nKey,@cSearch,Nombre ),oSay:REFRESH()} redefine say oSay prompt cSearch id 130 of odlg redefine get oGetNombre var nombre id 4004 of odlg odlg:REFRESH() ACTIVATE dialog odlg y la llamada a search_art es la siguiente *-------------------------------------------------- function Search_art( nKey, cSearch,Nombre ) *-------------------------------------------------- if nKey = 8 cSearch = SubStr( cSearch, 1, Len( cSearch ) - 1 ) else cSearch += Upper( Chr( nKey ) ) ENDIF articulos->( DbSeek( cSearch, .t. ) ) nombre:=articulos->nom_art return nil La verdad es que no veo en que está fallando... Por cierto si pongo en la funcion de arriba el nkey=13, ¿estoy preguntando si se ha pulsado la tecla intro? Un saludo y gracias.. Elías Torres
Comentario sobre una busqueda...
Hola a todos... Al final creo que he solucionado el tema con lo que tenia, pero lo que pasa es que no se como refrescar un get.... La informacion a buscar la quiero poner en : redefine get oGetNombre var articulos->nom_art id 4004 of odlg He probado a refrescar el odlg completo pero no me refresca ese get. El valor que tiene articulos->nom_art despues de la busqueda es correcto porque pongo un msginfo(articulos->nom_art) y cambia dependiendo de la busqueda, pero luego no me lo pone en el GET.. Alguien sabe por que? Un saludo y gracias.. Elías Torres.
Comentario sobre una busqueda...
Elias prueba oGetNombre:Refresh() Saludos
Comentario sobre una busqueda...
Gracias wilsongamboa, efectivamente era esa boberia.... Una curiosidad, a ver si alguien me puede responder.. Si mirais el procedimiento de arriba vereis que en nkey controlo la tecla que se pulsa. Hasta ahi correcto. Pero mi sorpresa viene cuando compruebo que la tecla intro, tanto en el teclado virtual con en el otro, no tiene su correspondiente numeración. Me explico, si se pulsa la tecla de borrar y ponemos msginfo(nkey) nos devuelve un 8, si pulsamos el espacio nos devuelve un 32 (creo) pero cuando se pulsa en el intro no hace nada. Es como que no tiene accion ninguna. ¿Alguien sabe porque ocurre esto, y si tiene alguna solución?. En mi caso lo que pretendo hacer es que escribo un codigo y hasta que no le de al intro no realiza la actualizacion de la pantalla, pero claro por ahora lo tengo para que me funcione al pulsar el espacio, pero me gustaria que fuera con la tecla intro. Un saludo y gracias.. Elías Torres.
Comentario sobre una busqueda...
Elías, Por favor muestra el código de cómo lo estás haciendo, gracias
Comentario sobre una busqueda...
Perdona Antonio, se me paso poner el codigo.... Bueno, estas son las dos funciones que estoy utilizando. Lo que pretendo hacer es un inventario, en el que al introducir un codigo muestre la descripcion y las cantidades(estas ultimas se podrán modificar) y asi sucesivamente.... Yo creo que el motivo por el que no funciona el intro (ni en el emulador ni en el teclado) es por el procedimiento de busqueda que realizo, pero mi duda es porque el borrar si lo hace.... Si tienes alguna sugerencia de como realizar la busqueda una vez introducido el codigo, comentamela...te lo agradeceria mucho. El codigo es el siguiente.... ****************** FUNCTION Registros() ****************** local oDlg LOCAL oGetInventario, oGetNombre, oGetAcumulado, oGetCantidad, LOCAL oGetFecha, cantidad:=0,acumulado:=0, cSearch := "",nombre SELECT inventario IF EOF() c=1 ELSE inventario->(dbgobottom()) c=val(inventario->numdoc)+1 endif oGetInventario_cod=RIGHT(STR(1000000+c),6) oGetFecha=(DTOC(date())+' '+cValToChar((TIME()))) Inventario->(dbappend()) inventario->numdoc:=oGetInventario_cod inventario->fecha_doc:=oGetFecha showkeyboard() (cAliasInventario)->(DbSeek((cAliasArticulos)->cod_art,.t.)) DEFINE dialog odlg resource "Inventario" redefine group ogrp id 600 of odlg color CLR_RED,RGB(230,184,94) DEFINE font oFont2 name "Courier New" bold redefine say id 4001 of odlg color CLR_RED, RGB(230,184,94) redefine say id 4002 of odlg color CLR_RED, RGB(230,184,94) redefine say id 4003 of odlg color CLR_RED, RGB(230,184,94) redefine say id 120 of odlg color CLR_RED, RGB(230,184,94) redefine say id 4010 of odlg color RGB(1,1,1),RGB(230,184,94) redefine say id 4011 of odlg color RGB(1,1,1),RGB(230,184,94) DEFINE FONT oFont NAME "Courier New" SIZE 6, -14 redefine say oSay prompt cSearch id 130 of odlg COLOR CLR_BLACK, CLR_WHITE oSay:bKeyChar = { | nKey, nFlags | Search_art( nKey, @cSearch),oSay:REFRESH(),oGetNombre:Refresh()} redefine get oGetAcumulado var acumulado id 4007 of odlg redefine get oGetCantidad var cantidad id 4005 of odlg redefine get oGetNombre var articulos->nom_art id 4004 of odlg redefine get oGetNumDoc var oGetInventario_cod id 4008 of odlg redefine get oGetFecha_Doc var oGetFecha id 4009 of odlg odlg:setcolor(RGB(1,1,1),RGB(230,184,94)) inventario->codigo:=articulos->cod_art inventario->pvp:=articulos->precio inventario->nombre:=articulos->nom_art inventario->stock:= acumulado inventario->cant:= cantidad ACTIVATE dialog odlg; on init barra_desplazamiento( odlg) oFont:End() RETURN nil ************************************ function Search_art( nkey,cSearch,nombre ) ************************************ if nKey = 8 &&equivale a pulsar la tecla de borrar cSearch = SubStr( cSearch, 1, Len( cSearch ) - 1 ) else cSearch += Upper( Chr( nKey ) ) ENDIF IF nKey = 32 &&equivale a pulsar el espacio articulos->( DbSeek( ALLTRIM(@cSearch)),.t.) cSearch="" endif return nil Un saludo y gracias. Elías Torres.
Comentario sobre una busqueda...
Elías, Prueba a usar: oSay:bKeyDown = { | nKey, nFlags | If( nKey == VK_RETURN, MsgInfo( "return" ),) }
Comentario sobre una busqueda...
Antonio, he probado lo que me has dicho pero no funciona. En nkey no se registra el VK_RETURN. Cualquier otra cosa si pero ese no.... Saludos... Elías Torres.
Comentario sobre una busqueda...
Elías, Este ejemplo funciona correctamente: [code:31l9bx48] // FiveWin for Pocket PC - Testing browses with incremental search #include "FWCE&#46;ch" REQUEST DBFCDX //----------------------------------------------------------------------------// function Main&#40;&#41; local oWnd, oBrw, hBmp &#58;= ReadBitmap&#40; CurDir&#40;&#41; + "\go&#46;bmp" &#41; local oSay, cSearch &#58;= "" USE &#40; CurDir&#40;&#41; + "\Customer" &#41; VIA "DBFCDX" INDEX ON Customer->Last TO "LAST" Customer->&#40; OrdSetFocus&#40; "LAST" &#41; &#41; Customer->&#40; DbGoTop&#40;&#41; &#41; DEFINE WINDOW oWnd TITLE "IncSearch" @ 1, 1 LISTBOX oBrw ; FIELDS hBmp, Customer->Last, Customer->First ; HEADERS "", "Last", "First" ; SIZE 220, 167 oBrw&#58;bKeyChar = &#123; | nKey, nFlags | Search&#40; nKey, @cSearch &#41;, oBrw&#58;Refresh&#40;&#41;,; oSay&#58;Refresh&#40;&#41; &#125; @ 14, 2 SAY "Searching&#58;" SIZE 60, 30 @ 14, 12 SAY oSay PROMPT cSearch SIZE 80, 30 ACTIVATE WINDOW oWnd ; ON CLICK MsgInfo&#40; "Click!" &#41; return nil //----------------------------------------------------------------------------// function Search&#40; nKey, cSearch &#41; #define VK_RETURN 13 if nKey == VK_RETURN MsgInfo&#40; "ok" &#41; endif if nKey = 8 cSearch = SubStr&#40; cSearch, 1, Len&#40; cSearch &#41; - 1 &#41; else cSearch += Upper&#40; Chr&#40; nKey &#41; &#41; endif Customer->&#40; DbSeek&#40; cSearch, &#46;t&#46; &#41; &#41; return nil //----------------------------------------------------------------------------// [/code:31l9bx48]
Comentario sobre una busqueda...
Antonio, efectivamente el ejemplo que me pasas funciona correctamente pero para mi aplicacion no va..... He estado comparandolos y la unica diferencia que veo es que en el ejemplo se trabaja con un browse y mi aplicacion con un say, ¿puede ser ese el problema?.. ********** Mi aplicacion ********** oSay:bKeyChar = { | nKey, nFlags | Search_art( nKey, @cSearch),oSay:REFRESH(),oGetNombre:Refresh()} ********** El ejemplo ********** oBrw:bKeyChar = { | nKey, nFlags | Search( nKey, @cSearch ), oBrw:Refresh(),oSay:Refresh() } Ademas he colocado el #define VK_RETURN 13 en el Search(nkey,@cSearch) porque eso si que no lo tenia, pero nada, no va.... Un saludo y gracias. Elías Torres.
Comentario sobre una busqueda...
Elías, Un SAY no responde a los eventos de teclado. No puedes usarlo.
Comentarios en Excel
Hola a todos,Si para dar valor a una celda de Excel realizo:oHoja:Cells( 5, 23):Value := "El Valor"cómo añadiría un comentario/nota a esa misma celda?He buscado en el foro y no he visto ningún ejemplo de ello.Saludos y graciasCarlos G.
Comentarios en Excel
Carlos,Has probado con:oHoja:Cells( 5, 23 ):Comment := "comentario"ó mejor:oHoja:Cells( 5, 23 ):AddComment()oHoja:Cells( 5, 23 ):Comment:Text := "comentario"
Comentarios en Excel
[quote="Antonio Linares":8o00d3rx]Carlos, Has probado con: oHoja:Cells( 5, 23 ):Comment := "comentario" ó mejor: oHoja:Cells( 5, 23 ):AddComment() oHoja:Cells( 5, 23 ):Comment:Text := "comentario"[/quote:8o00d3rx]Había probado:oHoja:Cells( 5, 23 ):Comment := "comentario"yoHoja:Cells( 5, 23 ):Comment:Text := "comentario"pero no le estaba añadiendooHoja:Cells( 5, 23 ):AddComment()Ha funcionado perfecto.Un saludo y GraciasCarlos G.
Comentarios en Excel
Carlos,Para múltiples líneas en el comentario prueba con Chr( 10 ) en vez de CRLF
Comentarios en Excel
Puedes usar facilmente StrTran() para cambiar de CRLF a Chr( 10 ) si el texto ya está construido
Comentarios en Excel
[quote="Antonio Linares":izox3qs6]Puedes usar facilmente StrTran() para cambiar de CRLF a Chr( 10 ) si el texto ya está construido[/quote:izox3qs6]Gracias,Lo probaré.Buen fin de semana.Carlos G.
Comenzando con FiveWin
Hola a todos, Recien empiezo a trabajar con FiveWin asi que de ante mano os agradezco toda la ayuda que me podais brindar, que tengais paciencia conmigo y ojala pronto yo pueda ayudaros en algo. Saludos a todos, Antonio G.
Comenzando con FiveWin
Un placer Antonio... Bienvenido a la comunidad, estamos a la orden y publica cualquier duda que tengas...
Comenzando con FiveWin
Hola Antonio... Bienvenido al foro! Seguramente recibirás todas las ayudas que necesites, siempre hay buena predisposición de todos los miembros, tanto para ayudar como para aprender!! Saludos,
Comenzando con FiveWin
Antonio, Bienvenido seas a este gran foro. Verás que muchos están puestos a ayudar.
Comenzando con FiveWin
Antonio : Bienvenido!
Comenzando con HB64. ERROR LNK1123
Hola, Estoy intentando construir un ejemplo con Harbour de 64bits, pero no después de configurar los paths tengo el siguiente errror [code=fw:1ucemvks]<div class="fw" id="{CB}" style="font-family: monospace;">Harbour <span style="color: #000000;">3.2</span>.0dev <span style="color: #000000;">&#40;</span>Rev. <span style="color: #000000;">18881</span><span style="color: #000000;">&#41;</span><br />Copyright <span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span> <span style="color: #000000;">1999</span><span style="color: #000000;">-2013</span>, http:<span style="color: #B900B9;">//harbour-project.org/</span><br />Compiling <span style="color: #ff0000;">'TUTOR02.prg'</span> and generating preprocessed output <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">'TUTOR02.ppo'</span>...<br />Lines <span style="color: #000000;">4208</span>, Functions/Procedures <span style="color: #000000;">1</span><br />Generating C source output <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">'TUTOR02.c'</span>... Done.<br />Microsoft <span style="color: #000000;">&#40;</span>R<span style="color: #000000;">&#41;</span> C/C++ Optimizing Compiler Version <span style="color: #000000;">16.00</span><span style="color: #000000;">.30319</span><span style="color: #000000;">.01</span> <span style="color: #00C800;">for</span> x64<br />Copyright <span style="color: #000000;">&#40;</span>C<span style="color: #000000;">&#41;</span> Microsoft Corporation.  All rights reserved.<br /><br />TUTOR02.c<br />Microsoft <span style="color: #000000;">&#40;</span>R<span style="color: #000000;">&#41;</span> Windows <span style="color: #000000;">&#40;</span>R<span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">Resource</span> Compiler Version <span style="color: #000000;">6.1</span><span style="color: #000000;">.7600</span><span style="color: #000000;">.16385</span><br />Copyright <span style="color: #000000;">&#40;</span>C<span style="color: #000000;">&#41;</span> Microsoft Corporation.  All rights reserved.<br /><br />LINK : <span style="color: #000000;">fatal</span> error LNK1123: <span style="color: #000000;">failure</span> during conversion <span style="color: #0000ff;">to</span> COFF: <span style="color: #000000;">file</span> invalid or c<br />orrupt<br />* Linking errors *</div>[/code:1ucemvks]
Comenzando con HB64. ERROR LNK1123
Miguel A., Estas usando FWH\samples\build64.bat ? Comprueba que estes usando las mismas librerias que se especifican en build64.bat
Comenzando con HB64. ERROR LNK1123
Antonio, Despues de investigar veo que build64.bat hace referencia a unas librerias situadas en \harbour\lib\vc64 que yo no tengo las que tengo yo están en \harbour\lib pero si hago referencia a estas librerias se produce el error [code=fw:kfq5mp27]<div class="fw" id="{CB}" style="font-family: monospace;"><br />LINK : <span style="color: #000000;">fatal</span> error LNK1123: <span style="color: #000000;">failure</span> during conversion <span style="color: #0000ff;">to</span> COFF: <span style="color: #000000;">file</span> invalid or corrupt<br />* Linking errors *<br /><br />C:\fwh64\samples><br /> </div>[/code:kfq5mp27] Yo tengo librerias en C:\vc64\lib pero no son las que se referencian en build64.bat Que estoy haciendo mal? gracias
Comenzando con HB64. ERROR LNK1123
Miguel A., La versión actual de FWH 64 utiliza el compilador de C de Visual Studio 2012 (ó 2010). Por lo que es preciso que lo descargues desde Microsoft. La versión Visual Studio 2012 Express, que es gratuita, te sirve perfectamente. Disculpa este cambio en FWH 64, pero lo hemos hecho con la intención de ser mucho más compatible con Visual Studio <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Comenzando con HB64. ERROR LNK1123
gracias.
Comenzando con TDatabase
Buenas tardes, Debo comenzar una pequeña aplicación para trabajar en red (uso DBF's) y, como hace un tiempo un amigo del foro me recomendó usar la clase TDatabase, los consulto por este motivo. Mi aplicación abrirá varios dialogs nowait que usarán la misma DBF y la consulta es si, debido al uso de estos nowait puedo usar alias para abrir las DBF con la clase tDatabase y, si no fuera así, ¿como debería hacerlo?. Aclaro que revisé los samples pero en ellos no se usan dialogs nowait así que no encontré ejemplos. Gracias. Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Comenzando con TDatabase
Amigo... Puedes usar alias perfectamente [code=fw:ppp8vka7]<div class="fw" id="{CB}" style="font-family: monospace;"><br />USE TABLA <span style="color: #0000ff;">ALIAS</span> TuAlias <span style="color: #00C800;">NEW</span><br />DATABASE oDbf<br />...<br />...<br />...<br />&nbsp;</div>[/code:ppp8vka7] Saludos,
Comenzando con TDatabase
Hola, Sigo tratando de "Iniciarme" con la clase TDatabase. Tengo un problema y es que no logro cerrar los alias abiertos cuando cierro el/los dialogs. Como habitualmente hago con los dialogs NOWAIT, intenté cerrar el alias en el valid, pero no resulta y dá un error. Adjunto el código del PRG de prueba que es una reforma al PRG de los Salmples: [code=fw:364ecfga]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">static</span> oWnd<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />     set resources <span style="color: #0000ff;">to</span> <span style="color: #ff0000;">'dbfpla.dll'</span><br /><br />     <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">20</span>, <span style="color: #000000;">70</span> ;<br />      <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Testing DataBase Objects"</span> ;<br />      <span style="color: #0000ff;">MENU</span> BuildMenu<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWnd ;<br />      <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"FiveWin - Object Oriented DataBase Management"</span> <span style="color: #0000ff;">CENTERED</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span> ;<br />      <span style="color: #0000ff;">VALID</span> MsgYesNo<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Do you really want to end ?"</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> BuildMenu<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oMenu<br /><br />   <span style="color: #0000ff;">MENU</span> oMenu<br />      <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Clients"</span><br />      <span style="color: #0000ff;">MENU</span><br />                 <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Hojear..."</span> <span style="color: #0000ff;">ACTION</span> ClientsBrowse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> ;<br />            <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Clients browse management dialog"</span><br /><br />         <span style="color: #0000ff;">SEPARATOR</span><br /><br />         <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"&Exit Test..."</span>  <span style="color: #0000ff;">ACTION</span> oWnd:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> ;<br />            <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"End doing this tutorial"</span><br />      <span style="color: #0000ff;">ENDMENU</span><br />   <span style="color: #0000ff;">ENDMENU</span><br /><br /><span style="color: #00C800;">return</span> oMenu<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /> <span style="color: #00C800;">Function</span> ClientsBrowse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oBrw , oLbx , lSalir:=.f. , oDbf<br />     <span style="color: #00C800;">local</span> cClientes:=cGetNewAlias<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'clientes'</span><span style="color: #000000;">&#41;</span><br />     <span style="color: #00C800;">static</span> oDlg<br /><br />     use CLIENTES shared <span style="color: #00C800;">new</span> <span style="color: #0000ff;">alias</span> <span style="color: #000000;">&#40;</span>cClientes<span style="color: #000000;">&#41;</span><br />     DATABASE oDbf<br /><br />     <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">dialog</span> oDlg <span style="color: #0000ff;">resource</span> <span style="color: #ff0000;">"XBROWSETEST"</span><br /><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">LISTBOX</span> oLbx ;<br />      FIELDS oDbf:<span style="color: #000000;">NOMBRE</span> ,;<br />                   oDbf:<span style="color: #000000;">DIRECCION</span> ;<br />      HEADERS <span style="color: #ff0000;">"Nombre"</span>,   <span style="color: #ff0000;">"Dirección"</span> ;<br />      SIZES   <span style="color: #000000;">250</span>, <span style="color: #000000;">300</span> ;<br />      <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br />            oLbx:<span style="color: #000000;">bSkip</span> = <span style="color: #000000;">&#123;</span> | nRecs | oDbf:<span style="color: #000000;">Skipper</span><span style="color: #000000;">&#40;</span> nRecs <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">nowait</span> <span style="color: #0000ff;">valid</span> <span style="color: #000000;">&#40;</span> oDbf:<span style="color: #000000;">close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> , .t.<span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br />procedure AppSys   <span style="color: #B900B9;">// XBase++ requirement</span><br /><br /><span style="color: #00C800;">return</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span></div>[/code:364ecfga] Funciona bién pero al cerrar el dialog me dá este error: [code=fw:364ecfga]<div class="fw" id="{CB}" style="font-family: monospace;">Application<br />===========<br />   Path and <span style="color: #0000ff;">name</span>: <span style="color: #000000;">D</span>:\VERCE\BIN\Dbf03.Exe <span style="color: #000000;">&#40;</span><span style="color: #000000;">32</span> bits<span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">Size</span>: <span style="color: #000000;">1</span>,<span style="color: #000000;">596</span>,<span style="color: #000000;">416</span> bytes<br />   Time <span style="color: #0000ff;">from</span> start: <span style="color: #000000;">0</span> hours <span style="color: #000000;">0</span> mins <span style="color: #000000;">8</span> secs <br />   Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">07</span>/<span style="color: #000000;">02</span>/<span style="color: #000000;">09</span>, <span style="color: #000000;">19</span>:<span style="color: #000000;">24</span>:<span style="color: #000000;">06</span><br />   Error description: <span style="color: #000000;">Error</span> BASE/<span style="color: #000000;">1004</span>  <span style="color: #0000ff;">Message</span> not found: <span style="color: #000000;">TDATABASE</span>:<span style="color: #000000;">NOMBRE</span><br /><br />Stack Calls<br />===========<br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">HARBOUR</span>.PRG => _CLSSETERROR<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">DATABASE</span>.PRG => TDATABASE:<span style="color: #000000;">NOMBRE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">410</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">dbf03</span>.prg => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>CLIENTSBROWSE<span style="color: #000000;">&#40;</span><span style="color: #000000;">64</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">WBROWSE</span>.PRG => TWBROWSE:<span style="color: #000000;">DRAWSELECT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">WBROWSE</span>.PRG => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>TWBROWSE:<span style="color: #000000;">TWBROWSE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => TWBROWSE:<span style="color: #000000;">LOSTFOCUS</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">CONTROL</span>.PRG => TWBROWSE:<span style="color: #000000;">KILLFOCUS</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">CONTROL</span>.PRG => TWBROWSE:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => DESTROYWINDOW<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #0000ff;">DIALOG</span>.PRG => TDIALOG:<span style="color: #000000;">CLOSE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => TWINDOW:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #0000ff;">DIALOG</span>.PRG => TDIALOG:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => SYSREFRESH<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #0000ff;">DIALOG</span>.PRG => TDIALOG:<span style="color: #000000;">END</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #0000ff;">WINDOW</span>.PRG => TWINDOW:<span style="color: #000000;">SYSCOMMAND</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #0000ff;">DIALOG</span>.PRG => TDIALOG:<span style="color: #000000;">SYSCOMMAND</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => TWINDOW:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #0000ff;">DIALOG</span>.PRG => TDIALOG:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => WINRUN<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #0000ff;">WINDOW</span>.PRG => TWINDOW:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">dbf03</span>.prg => MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">21</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:364ecfga] Quedo a la espera de una ayuda. Gracias. Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Comenzando con TDatabase
Hola Creo que una de las cosas que te debes olvidar cuando utilizas objetos relacionas con Banco de Datos, en este caso Database, es olvidarte del alias. Si revisas la clase te daras cuenta que ella sola asigna el alias (esto dependiendo de que version fw usas) Para tu ejemplo: -definiria varios 'oDbf's como publico (pudiendo ser um arreglo de objetos), es decir para que se "vea" en toda la aplicacion. [code=fw:2qy48yqj]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">Public</span> oDbf <br /><span style="color: #B900B9;">// o</span><br /><span style="color: #00C800;">Public</span> aDbf = Array<span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span></div>[/code:2qy48yqj] -abriria la database al inicio de la aplicacion tantas veces como sea necesario y asignandole el objeto respectivo. [code=fw:2qy48yqj]<div class="fw" id="{CB}" style="font-family: monospace;"><br />use CLIENTES shared <span style="color: #00C800;">new</span><br />DATABASE oDbf<br /><span style="color: #B900B9;">//o</span><br />use CLIENTES shared <span style="color: #00C800;">new</span><br />DATABSE aDbf<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br /><br />use CLIENTES shared <span style="color: #00C800;">new</span><br />DATABSE aDbf<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />........<br /> </div>[/code:2qy48yqj] -cerraria los obj al final de la aplicacion. [code=fw:2qy48yqj]<div class="fw" id="{CB}" style="font-family: monospace;"> oDbf:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">// o </span><br />AEval<span style="color: #000000;">&#40;</span> aDbf, <span style="color: #000000;">&#123;</span> |o| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> o != <span style="color: #00C800;">Nil</span>, o:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span></div>[/code:2qy48yqj]
Comenzando con TDatabase
Gracias por contestar. Lo que Propones no se adapta a lo que necesito. Tu propones abrir la DBF una cantidad de veces predefinida pero en mi caso estos dialogs se abrirán muchísimas veces durante la ejecución del programa y además nunca será la misma cantidad de veces. Por esto necesito ir cerrando los alias u objetos DBF abiertos. ¿Alguna otra idea?. Gracias. Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Comenzando con TDatabase
Hola, Logré solucionarlo con un mínimo cambio en el activate. En lugar de: [code=fw:3cmg6z5m]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">nowait</span> <span style="color: #0000ff;">valid</span> <span style="color: #000000;">&#40;</span> oDbf:<span style="color: #000000;">close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> , .t.<span style="color: #000000;">&#41;</span><br /> </div>[/code:3cmg6z5m] Puse: [code=fw:3cmg6z5m]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">nowait</span> <span style="color: #0000ff;">valid</span> oLbx:<span style="color: #000000;">lCloseArea</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>[/code:3cmg6z5m] Y eso es todo. Funciona tal cual pretendía. Saludos. Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Comenzando con xBROWSE
Despues de tantos golpes, active Xbrowse pero tengo el siguiente problema, estoy usando CDX, le agregue 3 registros manualmente con diferentes valores pero me muestra solo el ultimo registro repetidamente como si fueran iguales todos los registros, coloque oBrw:SetRDD()oBrw:Refresh( .t. )asi si veo los diferentes datos de los registros, pero me muestra todos los campos de la DBF con sus respectivos nombre en forma horizontal, si uso solo oBrw:Refresh( .t. ), me da un error de que no esta definido el bloque...le di vueltas pero no consegui resolver....alguna ayuda seria buena...gracias..y si alguien tiene algun ejemplo con las mayorias de las opciones del Xbrowse y oCol, no estaria de mas..dede ya ..GRACIAS... ya probe varios metodos y los identifique. <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
Comenzando con xBROWSE
Jose Luis,Por favor muéstranos el código donde creas el xbrowse, gracias
Comenzando con xBROWSE
[quote="Antonio Linares":1mw735d8]Jose Luis, Por favor muéstranos el código donde creas el xbrowse, gracias[/quote:1mw735d8]Antonio resuelto, fue un lapsu mental..esas cosas que pasan cuando estas trabajando a las 3am... habia puesto esto:oColInven:bStrData := { || ALLTRIM(oDbfInven:inv_codigo)}en ves de esto:oColInven:bStrData := { || ALLTRIM(jlinven->inv_codigo)}Gracias..!
Comenzar aplicacion
Hola a todos, Solo quiero saber si existe algun ejemplo de como empezar desde 0 una aplicacion, para crear la ventana padre y luego las ventanas hijas, etc...Atentamente,Julio Ponce
Comenzar aplicacion
Hola a todos, Solo quiero saber si existe algun ejemplo de como empezar desde 0 una aplicacion, para crear la ventana padre y luego las ventanas hijas, etc... Atentamente, Julio Ponce
Comenzar aplicacion
jponce,Todos los que estamos aca hemos pasado por tu situacion , yo me tope con un curso que esta de la a la z muy intuitivo, ojala te sirva aqui pongo el enlace para que el que esta iniciando lo pueda descargar, <!-- m --><a class="postlink" href="http://www.box.net/shared/3r8bsmviso">http://www.box.net/shared/3r8bsmviso</a><!-- m -->Nota: el ejecutable se llama fivewin.exe y el te va guiando paso a paso, solo desempaquetalo y yasaludos desde managua, nicaragua,Ramon Paredes