Page 2 of 3

Posted: Thu Jan 15, 2009 9:03 am
by chi
@kiffi: that would be nice ;)

@ts-soft: thanks for the checkbox-example... now i know what went wrong with my code... (grĂ¼sse nach de)


cheers, chi

Posted: Sun Jan 18, 2009 8:19 pm
by chen
ts-soft wrote:
USCode wrote:But I have to ask, what in particular does wxWidgets offer that PB doesn't have that motivated you to do this?
Dimension of controls the same on win and lin, other like pb.
More Controls
Flickerfree Tab
Better Eventhandling
and, and ...
:wink:
from your perspective, then what advantages has PB over wxWidgets?

Posted: Sun Jan 18, 2009 8:27 pm
by ts-soft
chen wrote: from your perspective, then what advantages has PB over wxWidgets?
PB is easier, no dll required, smaller executable ...

Posted: Mon Jan 19, 2009 7:55 am
by hallodri
PB is not easier to learn and the executables are smaller as from PB.

Posted: Mon Jan 19, 2009 3:46 pm
by ts-soft
hallodri wrote:and the executables are smaller as from PB.
but requires a 3,66 MB DLL :wink:

Posted: Mon Jan 19, 2009 11:44 pm
by Kiffi
ts-soft wrote:but requires a 3,66 MB DLL :wink:
but nevertheless the executable is smaller.
ts-soft wrote:smaller executable ...
;-)

Greetings ... Kiffi

Posted: Mon Jan 19, 2009 11:48 pm
by ts-soft
i write it in a short form, my english is to bad for longer explanation :oops:

Posted: Tue Jan 20, 2009 6:35 am
by chen
ts-soft wrote:
hallodri wrote:and the executables are smaller as from PB.
but requires a 3,66 MB DLL :wink:
If wanted to minimize executables : http://wiki.wxwidgets.org/Reducing_Executable_Size

what's wrong with that event ?

Posted: Thu Mar 26, 2009 1:42 pm
by glops

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()
Message Invalid memory access...
Do you know how to correct this error in my code (in click_event() ) ?

Thanks

Posted: Thu Mar 26, 2009 1:50 pm
by ts-soft

Code: Select all

Procedure click_event(event,listener)
  x= 0
EndProcedure

Posted: Thu Mar 26, 2009 3:47 pm
by glops
thanks ! Will have further questions later !!

wxListCtrl

Posted: Tue Mar 31, 2009 4:52 pm
by glops
Does anybody know what's missing for a wxListCtrl ?

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()
ps: wxNotebook is running !!

Posted: Tue Mar 31, 2009 8:34 pm
by hallodri
I've forgotten the constant.

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()

Re: wxWidget

Posted: Thu Oct 29, 2009 11:21 pm
by klaver
What's the version of wxWidgets? Is it 2.6.4 as in docs link?

Re: wxWidget

Posted: Thu Sep 19, 2013 2:01 pm
by Tenaja
I just tried to run this out of curiosity. Unfortunately, the new PB 5.20 feature Module breaks the wxWidget, because a variable in the library is named Module. I tried renaming it in the declare, but it seems that it will not work properly until it is renamed in the original C lib.