@ts-soft: thanks for the checkbox-example... now i know what went wrong with my code... (grüsse nach de)
cheers, chi
from your perspective, then what advantages has PB over wxWidgets?ts-soft wrote:Dimension of controls the same on win and lin, other like pb.USCode wrote:But I have to ask, what in particular does wxWidgets offer that PB doesn't have that motivated you to do this?
More Controls
Flickerfree Tab
Better Eventhandling
and, and ...
PB is easier, no dll required, smaller executable ...chen wrote: from your perspective, then what advantages has PB over wxWidgets?

but requires a 3,66 MB DLLhallodri wrote:and the executables are smaller as from PB.


If wanted to minimize executables : http://wiki.wxwidgets.org/Reducing_Executable_Sizets-soft wrote:but requires a 3,66 MB DLLhallodri wrote:and the executables are smaller as from PB.
Code: Select all
XIncludeFile #PB_Compiler_Home + "Include\inc.wx.pbi" 
Enumeration 
   #CONTROL 
   #myFrame
   #myText
   #myPanel
   #myButton
   #myBitmapButton
   #myBitmap
   #myImage
EndEnumeration 
Enumeration 
   #WINDOW_TEST 
EndEnumeration 
Global APP.i    
Procedure click_event()
  x= 0 
EndProcedure
    
Procedure OnInit() 
   Protected frame 
   Protected myPanel 
   Protected control 
   Protected myButton
   
   Protected myBitmapButton
   Protected myBitmap
   Protected myImage 
   
   
   ; fenster erstellen 
   frame = wxFrame() 
   myText = wxStaticText()
   control = wxCheckBox( ) 
   myButton = wxButton( )  
   myBitmapButton = wxBitmapButton()
   myBitmap = wxBitmap()
   myImage = wxImage()
   
   wxFrame_Create(frame, #WINDOW_TEST, 1, "Test", wxSize(-1,-1), wxSize(-1,-1), #wxDEFAULT_FRAME_STYLE, "frame") 
   
   wxCheckBox_Create (control,  frame ,  #CONTROL,  "I'm a checkbox" ,  wxSize(-1, -1),  wxSize(-1, -1),  0,  0,  "checkBox")    
   wxCheckBox_SetValue(control, #True) 
   
   wxButton_Create ( myButton ,  frame ,  #myButton ,  "button" ,  wxSize(50,50) ,  wxSize(100,20) ,  0 ,  wxValidator ,  "button" )  
   wxEvtHandler_proxy( myButton, @click_event() )
   wxEvtHandler_connect( myButton, wxEvent_EVT_COMMAND_BUTTON_CLICKED(), -1, -1, 0 )
   wxStaticText_Create ( myText ,  frame ,  #myText ,  "STATIC test ",  wxSize(30,30) ,  wxDefaultSize ,  0 ,  "staticText") 
       
   ; Frame anzeigen 
   wxWindow_Show(frame,#True)    
    
   ProcedureReturn wxApp_OnInit(APP) 
EndProcedure 
Procedure OnExit()    
   ProcedureReturn wxApp_OnExit(APP) 
EndProcedure    
Procedure Main()    
   APP    = wxApp() 
   wxApp_RegisterVirtual(app,@OnInit(),@OnExit())    
   wxApp_Run(0,0)    
EndProcedure:Main()Code: Select all
Procedure click_event(event,listener)
  x= 0
EndProcedure
Code: Select all
XIncludeFile #PB_Compiler_Home + "Include\inc.wx.pbi" 
Enumeration 
   #CONTROL 
   #myFrame
   #myText
   #myPanel
   #myButton
   #myBitmapButton
   #myBitmap
   #myImage
   #myListCtrl
EndEnumeration 
Enumeration 
   #WINDOW_TEST 
EndEnumeration 
Global APP.i    
Procedure OnInit() 
   Protected frame 
   Protected myListCtrl
   
   ; fenster erstellen 
   frame = wxFrame() 
  wxFrame_Create(frame, #WINDOW_TEST, 1, "Test", wxSize(-1,-1), wxSize(-1,-1), #wxDEFAULT_FRAME_STYLE, "frame") 
   
   myListItem = wxListItem()
   myListCtrl = wxListCtrl()
   wxListCtrl_Create ( myListCtrl ,  frame ,  #myListCtrl , wxSize(60,70) ,  wxSize(250,150) ,  wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_HRULES|wxLC_VRULES ,  wxValidator ,  "listCtrl" )  
    
    wxListItem_SetImage(myListItem,-1);
    wxListItem_SetTextColour(myListItem, wxColour_ctorByName("Blue"));
    wxListItem_SetText(myListItem,"col1");
    wxListCtrl_InsertColumn(myListCtrl,0, myListItem);
    wxListCtrl_SetColumnWidth(myListCtrl,0, wxLIST_AUTOSIZE );
    ;wxListCtrl_SetColumnWidth(myListCtrl,0, 100 );
     
	
   wxWindow_Show(frame,#True)    
    
   ProcedureReturn wxApp_OnInit(APP) 
EndProcedure 
Procedure OnExit()    
   ProcedureReturn wxApp_OnExit(APP) 
EndProcedure    
Procedure Main()    
   APP    = wxApp() 
   wxApp_RegisterVirtual(app,@OnInit(),@OnExit())    
   wxApp_Run(0,0)    
EndProcedure:Main()Code: Select all
#wxLC_VRULES          = $0001
#wxLC_HRULES          = $0002
#wxLC_ICON            = $0004
#wxLC_SMALL_ICON      = $0008
#wxLC_LIST            = $0010
#wxLC_REPORT          = $0020
#wxLC_ALIGN_TOP       = $0040
#wxLC_ALIGN_LEFT      = $0080
#wxLC_AUTOARRANGE     = $0100
#wxLC_VIRTUAL         = $0200
#wxLC_EDIT_LABELS     = $0400
#wxLC_NO_HEADER       = $0800
#wxLC_NO_SORT_HEADER  = $1000
#wxLC_SINGLE_SEL      = $2000
#wxLC_SORT_ASCENDING  = $4000
#wxLC_SORT_DESCENDING = $8000 
#wxLC_MASK_TYPE      = (#wxLC_ICON | #wxLC_SMALL_ICON | #wxLC_LIST | #wxLC_REPORT)
#wxLC_MASK_ALIGN     = (#wxLC_ALIGN_TOP | #wxLC_ALIGN_LEFT)
#wxLC_MASK_SORT      = (#wxLC_SORT_ASCENDING | #wxLC_SORT_DESCENDING)
#wxLIST_MASK_STATE        =   $0001
#wxLIST_MASK_TEXT         =   $0002
#wxLIST_MASK_IMAGE        =   $0004
#wxLIST_MASK_DATA         =   $0008
#wxLIST_SET_ITEM          =   $0010
#wxLIST_MASK_WIDTH        =   $0020
#wxLIST_MASK_FORMAT       =   $0040
#wxLIST_STATE_DONTCARE    = $0000
#wxLIST_STATE_DROPHILITED = $0001      
#wxLIST_STATE_FOCUSED     = $0002
#wxLIST_STATE_SELECTED    = $0004
#wxLIST_STATE_CUT         = $0008      
#wxLIST_HITTEST_ABOVE            = $0001  
#wxLIST_HITTEST_BELOW            = $0002  
#wxLIST_HITTEST_NOWHERE          = $0004  
#wxLIST_HITTEST_ONITEMICON       = $0020  
#wxLIST_HITTEST_ONITEMLABEL      = $0080  
#wxLIST_HITTEST_ONITEMRIGHT      = $0100  
#wxLIST_HITTEST_ONITEMSTATEICON  = $0200  
#wxLIST_HITTEST_TOLEFT           = $0400  
#wxLIST_HITTEST_TORIGHT          = $0800  
#wxLIST_HITTEST_ONITEM  = (#wxLIST_HITTEST_ONITEMICON | #wxLIST_HITTEST_ONITEMLABEL | #wxLIST_HITTEST_ONITEMSTATEICON)
Enumeration
  #wxLIST_NEXT_ABOVE
  #wxLIST_NEXT_ALL
  #wxLIST_NEXT_BELOW
  #wxLIST_NEXT_LEFT
  #wxLIST_NEXT_RIGHT
EndEnumeration
Enumeration
  #wxLIST_ALIGN_DEFAULT
  #wxLIST_ALIGN_LEFT
  #wxLIST_ALIGN_TOP
  #wxLIST_ALIGN_SNAP_TO_GRID
EndEnumeration
Enumeration
  #wxLIST_FORMAT_LEFT
  #wxLIST_FORMAT_RIGHT
  #wxLIST_FORMAT_CENTRE
  #wxLIST_FORMAT_CENTER = #wxLIST_FORMAT_CENTRE
EndEnumeration
Enumeration
  #wxLIST_AUTOSIZE = -1
  #wxLIST_AUTOSIZE_USEHEADER = -2
EndEnumeration     
Enumeration
  #wxLIST_RECT_BOUNDS
  #wxLIST_RECT_ICON
  #wxLIST_RECT_LABEL
EndEnumeration
Enumeration
  #wxLIST_FIND_UP
  #wxLIST_FIND_DOWN
  #wxLIST_FIND_LEFT
  #wxLIST_FIND_RIGHT
EndEnumeration
Code: Select all
Enumeration 
   #CONTROL 
   #myFrame 
   #myText 
   #myPanel 
   #myButton 
   #myBitmapButton 
   #myBitmap 
   #myImage 
   #myListCtrl 
EndEnumeration 
Enumeration 
   #WINDOW_TEST 
EndEnumeration 
Global APP.i    
Procedure OnInit() 
   Protected frame 
   Protected myListCtrl 
   
    frame = wxFrame() 
    wxFrame_Create(frame, #WINDOW_TEST, 1, "Test", wxSize(-1,-1), wxSize(-1,-1), #wxDEFAULT_FRAME_STYLE, "frame") 
    
    myListItem = wxListItem() 
    myListCtrl = wxListCtrl() 
    wxListCtrl_Create ( myListCtrl ,  frame ,  #myListCtrl , wxSize(60,70) ,  wxSize(250,150) ,  #wxLC_REPORT|#wxLC_SINGLE_SEL|#wxLC_HRULES|#wxLC_VRULES ,  #Null ,  "listCtrl" )      
    
    wxListItem_SetText(myListItem,"col1")    
    
    wxListCtrl_InsertColumn(myListCtrl,0, myListItem)
    
    wxListCtrl_SetColumnWidth(myListCtrl,0, 100 )    
    
    
    wxWindow_Show(frame,#True)    
    
   ProcedureReturn wxApp_OnInit(APP) 
EndProcedure 
Procedure OnExit()    
   ProcedureReturn wxApp_OnExit(APP) 
EndProcedure    
Procedure Main()    
   APP    = wxApp() 
   wxApp_RegisterVirtual(app,@OnInit(),@OnExit())    
   wxApp_Run(0,0)    
EndProcedure:Main()