It is currently Fri May 24, 2013 5:26 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 195 posts ]  Go to page Previous  1 ... 8, 9, 10, 11, 12, 13  Next
Author Message
 Post subject:
PostPosted: Tue Mar 31, 2009 5:42 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 9870
Location: Beyond the pale...
nxPropertyBox and nxSplitter controls.
These controls have both undergone a quite major update (Purebasic 4.3 version). In the case of the nxPropertyBox control, the alterations will break all existing code (my apologies), though any modifications required by applications will be very straight forward.

nxPropertyBox.
It is now possible to add items which do not belong to any 'group'. To do this the nx_AddGadgetItem() function has been changed for this control.

The 'imageID' parameter now points to the new item's nxPropertyBox_Item structure (not the 'flags' parameter) whilst the 'flags' parameter is to hold a non-zero value if the new item is to belong to the 'current' group (if there is one). See the demo programs for examples of how to employ these alterations.

Note that I have not automatically indented 'child' items for various reasons; not the least of which is the fact that some property boxes might allow the labels to be edited etc. and this would then require a quite major update to EsGRID which I do not have time for right now. Instead, you can simply pad child items label text with spaces if appropriate.


nxSplitter.
Have made alterations to extend the functionality of this control. You can now take steps to embed multiple controls directly within a nxSplitter without having to embed them first within a container gadget etc. This is because the control no longer complains if one of the two 'split' controls is omitted and also due to the fact that the #nxSplitter_GadgetsResized callback message is far more 'refined'. (See the nxGadgets_Residents.pbi source file for details).
There is also a new callback message : #nxSplitter_CustomPaint for those applications wishing to paint directly to the splitter control etc. (advanced users only).

Regards.

_________________
I may look like a mule, but I'm not a complete ass.

eScript
Arctic Reports
nxSoftware


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 12, 2009 6:58 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Aug 07, 2003 7:01 pm
Posts: 2853
Location: United Kingdom
I've just downloaded the ProGUI lib and there is a slight different in his residents to yours...

#I_IMAGENONE = $FFFFFFFFFFFFFFFE

vs.

#I_IMAGENONE = $FFFFFFFE

I know you both mean -2, but which one should win?

_________________
http://www.SinisterSoft.com <- My Business website
http://www.ReportComplete.com and http://www.ReportPlus.co.uk <- School end of term reports system


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 12, 2009 7:02 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 9870
Location: Beyond the pale...
Uhm, in which Nexus source file is this constant - I cannot find it!

_________________
I may look like a mule, but I'm not a complete ass.

eScript
Arctic Reports
nxSoftware


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 12, 2009 7:04 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 9870
Location: Beyond the pale...
This constant does not appear in the Nexus source at all. It does appear, however, in the nxToolbar source!

Just change the constant to -2 and you'll have no problem.

_________________
I may look like a mule, but I'm not a complete ass.

eScript
Arctic Reports
nxSoftware


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 12, 2009 7:32 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Aug 07, 2003 7:01 pm
Posts: 2853
Location: United Kingdom
Oops! sorry your right - it was the toolbar. Thanks for confirming -2 is ok.

_________________
http://www.SinisterSoft.com <- My Business website
http://www.ReportComplete.com and http://www.ReportPlus.co.uk <- School end of term reports system


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 28, 2009 12:24 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 9870
Location: Beyond the pale...
28th July 2009 - nxPropertyBox controls.

This update fixes quite a number of bugs with the nxPropertyBox control following my work upon the Pyrex report designer. I can finally say that the damn thing is now working like a property box control should! :wink:

The main problems were related to the notifications sent by the control to the developer's callback as the user altered properties etc.

Regards.

_________________
I may look like a mule, but I'm not a complete ass.

eScript
Arctic Reports
nxSoftware


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 28, 2009 2:24 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Aug 07, 2003 7:01 pm
Posts: 2853
Location: United Kingdom
Thanks for the update. :)

_________________
http://www.SinisterSoft.com <- My Business website
http://www.ReportComplete.com and http://www.ReportPlus.co.uk <- School end of term reports system


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 28, 2009 3:09 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat May 23, 2009 4:39 am
Posts: 203
Thank you, bossman


Top
 Profile  
 
 Post subject: Re: Nexus -library of custom gadgets (updated : 28/7/09)
PostPosted: Tue Sep 22, 2009 2:13 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Aug 07, 2003 7:01 pm
Posts: 2853
Location: United Kingdom
Just doing some major updates to ElementaryReports, so I thought I'd share some routines I use to manipulate various splitters for alternative views and to reduce 'initial' flicker caused by setting control positions...

Code:
;The following swaps the specified splitter
Procedure nxSplitter_Swap(id,refresh=#True)
  Protected hWnd, *nx._nxsplitter
  ;Check we have a valid splitter control, signified by the presence of the window property.
    If IsGadget(id)
      hWnd = GadgetID(id)
      *nx = GetProp_(hWnd, @"nxSPLITTER_PROP")
      If *nx ;A valid splitter control.
            temp=*nx\gad1
            *nx\gad1=*nx\gad2
            *nx\gad2=temp
            If refresh
           nxSplitter_PositionGadgets(*nx)
         EndIf
      EndIf
    EndIf
EndProcedure

;The following exchanges the specified splitter gadget's first split
Procedure nxSplitter_Exchange(id,id2,refresh=#True)
  Protected hWnd, *nx._nxsplitter, hWnd2, *nx2._nxsplitter
  ;Check we have a valid splitter control, signified by the presence of the window property.
    If IsGadget(id) And IsGadget(id2)
      hWnd = GadgetID(id)
      hWnd2 = GadgetID(id2)
      *nx = GetProp_(hWnd, @"nxSPLITTER_PROP")
      *nx2 = GetProp_(hWnd2, @"nxSPLITTER_PROP")
      If *nx And *nx2 ; both valid splitter control.
         SetParent_(GadgetID(*nx\gad1),hWnd2)
         SetParent_(GadgetID(*nx2\gad1),hWnd)
            temp=*nx\gad1
            *nx\gad1=*nx2\gad1
            *nx2\gad1=temp
            If refresh
           nxSplitter_PositionGadgets(*nx)
           nxSplitter_PositionGadgets(*nx2)
             EndIf
      EndIf
    EndIf
EndProcedure

;The following directly sets the splitter state
Procedure nxSplitter_SetPos(id,state,refresh=#True)
  Protected hWnd, *nx._nxsplitter
  ;Check we have a valid splitter control, signified by the presence of the window property.
    If IsGadget(id)
      hWnd = GadgetID(id)
      *nx = GetProp_(hWnd, @"nxSPLITTER_PROP")
      If *nx ;A valid splitter control.
            *nx\splitterPos = state
            If refresh
           nxSplitter_PositionGadgets(*nx)
         EndIf
      EndIf
    EndIf
EndProcedure   
        
Procedure RefreshView(mode)

   Select mode
      Case   0   ; Split
      
         If nx_GetGadgetAttribute(#MiddleSplitter,#nxSplitter_FirstGadget)<>#TopSplitter
            nxSplitter_Swap(#MiddleSplitter,#False)
         EndIf
         If nx_GetGadgetAttribute(#TopSplitter,#nxSplitter_FirstGadget)=#StudentContainer
            nxSplitter_Exchange(#TopSplitter,#BottomSplitter,#False)
            nxSplitter_Swap(#TopSplitter,#False)
         EndIf
               
         nxSplitter_SetPos(#MiddleSplitter,MiddleBorderPosition,#False)
         nx_SetGadgetState(#MiddleSplitter,#nxSplitter_AnchorSecondGadget)
         nx_SetGadgetState(#BottomSplitter,StudentListWidth)
         nx_SetGadgetState(#TopSplitter,MiddleHorizontalPosition)
         
      Case   1   ; Multi
         If nx_GetGadgetAttribute(#MiddleSplitter,#nxSplitter_FirstGadget)<>#BottomSplitter
            nxSplitter_Swap(#MiddleSplitter,#False)
         EndIf
         If nx_GetGadgetAttribute(#TopSplitter,#nxSplitter_FirstGadget)<>#StudentContainer
            nxSplitter_Swap(#TopSplitter,#False)
            nxSplitter_Exchange(#TopSplitter,#BottomSplitter,#False)
         EndIf
               
         nx_SetGadgetState(#MiddleSplitter,MiddleBorderPosition)
         nxSplitter_SetPos(#TopSplitter,StudentListWidth,#False)
         nx_SetGadgetState(#TopSplitter,#nxSplitter_AnchorFirstGadget)
         nx_SetGadgetState(#BottomSplitter,MiddleHorizontalPosition)
         
      Case   2   ; Full
         If nx_GetGadgetAttribute(#MiddleSplitter,#nxSplitter_FirstGadget)<>#TopSplitter
            nxSplitter_Swap(#MiddleSplitter,#False)
         EndIf
         If nx_GetGadgetAttribute(#TopSplitter,#nxSplitter_FirstGadget)<>#StudentContainer
            nxSplitter_Swap(#TopSplitter,#False)
            nxSplitter_Exchange(#TopSplitter,#BottomSplitter,#False)
         EndIf
            
         nxSplitter_SetPos(#MiddleSplitter,MiddleBorderPosition,#False)
         nx_SetGadgetState(#MiddleSplitter,#nxSplitter_AnchorSecondGadget)
         nxSplitter_SetPos(#TopSplitter,StudentListWidth,#False)
         nx_SetGadgetState(#TopSplitter,#nxSplitter_AnchorFirstGadget)
         nx_SetGadgetState(#BottomSplitter,MiddleHorizontalPosition)
         
      Case   3   ; Elementary
         If nx_GetGadgetAttribute(#MiddleSplitter,#nxSplitter_FirstGadget)<>#TopSplitter
            nxSplitter_Swap(#MiddleSplitter,#False)
         EndIf
         If nx_GetGadgetAttribute(#TopSplitter,#nxSplitter_FirstGadget)<>#StudentContainer
            nxSplitter_Swap(#TopSplitter,#False)
            nxSplitter_Exchange(#TopSplitter,#BottomSplitter,#False)
         EndIf
               
         nx_SetGadgetState(#MiddleSplitter,MiddleBorderPosition)
         nx_SetGadgetState(#TopSplitter,StudentListWidth)
         nx_SetGadgetState(#BottomSplitter,FavouritesTreeWidth)
         
   EndSelect
EndProcedure


The last example shows usage. Hope you find them useful. :)

_________________
http://www.SinisterSoft.com <- My Business website
http://www.ReportComplete.com and http://www.ReportPlus.co.uk <- School end of term reports system


Top
 Profile  
 
 Post subject: Re: Nexus -library of custom gadgets (updated : 28/7/09)
PostPosted: Sun Oct 04, 2009 1:51 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Dec 21, 2008 5:02 pm
Posts: 609
Location: Aarhus, Denmark
Regarding the nxExplorerBar:
Am I breaking something if I turn off the timer (MouseTimer) and instead call that procedure in nxExplorerBar_panelCallback() at a #WM_MOUSEMOVE event (to get rid of the #WM_TIMER event)?


Top
 Profile  
 
 Post subject: Re: Nexus -library of custom gadgets (updated : 28/7/09)
PostPosted: Sun Oct 04, 2009 10:37 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 9870
Location: Beyond the pale...
Conceivably you will indeed be breaking something yes. #WM_MOUSEMOVE events will only be received when the mouse moves across whatever window you have subclassed to receive this message. This is fine except that nxExplorerBar sometimes needs to receive notifications beyond this - e.g. it needs to know when the mouse is not over the control etc. Relying upon #WM_MOUSEMOVE is not reliable in such situations. You would need to use something like the TrackMouseEvent() api instead.

Can I ask why you wish to remove the timer? It shouldn't clash with PB's new timer commands and events except that it has an eventID of 0. You might change this to something like 1000 to avoid clashes etc.

_________________
I may look like a mule, but I'm not a complete ass.

eScript
Arctic Reports
nxSoftware


Top
 Profile  
 
 Post subject: Re: Nexus -library of custom gadgets (updated : 28/7/09)
PostPosted: Sun Oct 04, 2009 1:13 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Dec 21, 2008 5:02 pm
Posts: 609
Location: Aarhus, Denmark
Oh, I see :(
The #WM_TIMER event just seems to 'spoil' the meaning of WaitWindowEvent() as there is always an event occuring.

Is it then possible to call the procedure manually in the event loop as a response to #WM_MOUSEMOVE and #WM_MOUSELEAVE using TrackMouseEvent() as you suggest?


Top
 Profile  
 
 Post subject: Re: Nexus -library of custom gadgets (updated : 28/7/09)
PostPosted: Sun Oct 04, 2009 1:47 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 9870
Location: Beyond the pale...
You will find (under Vista at least) that certain common controls use their own timers as well and so, well, is there any point trying to remove the nxExplorer timer just to satisfy WaitWindowEvent() as you'll only get caught by the other timers anyhow?

If you wish to use TrackMouseEvent() instead then, well, you'll need to be careful.

_________________
I may look like a mule, but I'm not a complete ass.

eScript
Arctic Reports
nxSoftware


Last edited by srod on Sun Oct 04, 2009 2:26 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Nexus -library of custom gadgets (updated : 28/7/09)
PostPosted: Sun Oct 04, 2009 2:26 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 9870
Location: Beyond the pale...
Okay Arctic, here is a test version of the nxExplorer which does not use a timer and instead uses the TrackMouseEvent() api.

http://www.purecoder.net/nxExplorerBar.pbi

Please let me know if it works okay because I haven't done much testing. If it passes the Artic test then I shall consider making this the official version. :wink:

_________________
I may look like a mule, but I'm not a complete ass.

eScript
Arctic Reports
nxSoftware


Top
 Profile  
 
 Post subject: Re: Nexus -library of custom gadgets (updated : 28/7/09)
PostPosted: Sun Oct 04, 2009 3:41 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Dec 21, 2008 5:02 pm
Posts: 609
Location: Aarhus, Denmark
I have not run into these controls... yet :wink: (except the highlight animation for ButtonGadgets and StringGadgets)

Your new test version of the nxExplorerBar works perfectly here - it even works with the Windows Vista Flip 3D (updates the window) :D
Tried with window sizing, minimizing, maximizing and 'cursor-out-of-window' - no problems :o

Thanks a bunch, srod, your help is very appreciated :!:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 195 posts ]  Go to page Previous  1 ... 8, 9, 10, 11, 12, 13  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye