::oWnd:Refresh( .f. )
::oWnd:Refresh()
* Fix: samples\GradBrus.prg was failing when Alt was pressed or the mouse was clicked on a
radio or a checkbox. We have modified Class TControl Method HandleEvent() to solve it.
CONTROL "Core", 750, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 80, 220, 40, 13
James Bott wrote:I still wonder about the above. What is a "core" control?
#INCLUDE "fivewin.ch"
#INCLUDE "tdata.ch"
#INCLUDE "wcolors.CH"
#INCLUDE "xbrowse.CH"
FUNCTION TestInv
// Declare PRIVATE variables
PRIVATE oDiw, oInv, oInvr, oLbxin // Main dialog object
// Open the inventory database and set the index to part number order
oInv := tdata():new(, "einmst" )
IF !oInv:use()
MsgAlert( "Inventory file could not be opened" )
RETURN nil
ENDIF
oInv:setorder( "einnum" )
oInv:gotop()
// Create the tRecord for editing
oInvr:= TRecord():new( oInv )
// Create the editor dialog
DEFINE DIALOG oDiw RESOURCE "PRO2100" TRANSPARENT // BRUSH oBrush TRANSPARENT
REDEFINE CHECKBOX oInvr:invcof ID 750 OF oDiw ;
MESSAGE "Does this part have cores attached ?" UPDATE
REDEFINE CHECKBOX oInvr:invtxf ID 749 OF oDiw ;
MESSAGE "Is this part generally taxable ?" UPDATE
REDEFINE CHECKBOX oInvr:invtyp ID 748 OF oDiw ;
MESSAGE "Is this a stocking part ?" UPDATE
REDEFINE CHECKBOX oInvr:invapa ID 747 OF oDiw ;
MESSAGE "Should there be a parts kit attached to this item ? " UPDATE
// Create the browse control
REDEFINE XBROWSE oLBxin ID 716 OF oDiw ON CHANGE ( oInvr:load(), oDiw:update() ) UPDATE
oLbxin:setoDBF( oInv )
add to oLbxin header "Part" data oInv:invnum ALIGN LEFT
add to oLbxin Header "Description" data oInv:invdes ALIGN LEFT
add to oLbxin header "Cross Ref." data oInv:invcod ALIGN LEFT
add to oLbxin header "On Hand" data oInv:invstk ALIGN RIGHT PICTURE "9999.99"
add to oLbxin Header "Charge" data oInv:invchg ALIGN RIGHT PICTURE "99,999.99"
add to oLbxin Header "Location" data oInv:invloc ALIGN LEFT
add to oLbxin Header "Manufacturer" data oInv:invman ALIGN LEFT
// Activate the dialog screen
ACTIVATE DIALOG oDiw ON PAINT oLbxin:setfocus() ON INIT ( oDiw:center(wndmain()) )
RETURN NIL
// RESOURCE SCRIPT FOR ASW9 Updated: 09/2009 to 11/2009
#include <windows.h>
#include <commctrl.h>
#include <richedit.h>
#include "asw8.h"
#include "c:\fwh\include\WinApi.ch"
1 24 "WindowsXP.Manifest"
LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US
PRO2100 DIALOG DISCARDABLE 0, 0, 660, 175
STYLE WS_POPUP|DS_MODALFRAME|WS_CAPTION|WS_VISIBLE
CAPTION "Checkbox Test Program"
FONT 8, "Arial"
BEGIN
CONTROL "", 716, "TXBrowse", WS_TABSTOP|0x00a00000, 5, 30, 650, 135
CONTROL "Tax", 749, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 10, 5, 40, 13
CONTROL "Stock", 748, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 60, 5, 40, 13
CONTROL "Core", 750, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 110, 5, 40, 13
CONTROL "List", 747, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 160, 5, 32, 13
END
TimStone wrote:
- Code: Select all Expand view RUN
ON PAINT oLbxin:setfocus()
James, you have misunderstood: "Core" is the label, "Button" is the control type.
CONTROL "Core", 750, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 80, 220, 40, 13
AUTOCHECKBOX "Core", 750, 80, 220, 40, 13, BS_AUTOCHECKBOX | WS_TABSTOP
James Bott wrote:But why use a button as a ckeckbox?
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 47 guests