It is currently Fri May 24, 2013 10:20 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 195 posts ]  Go to page Previous  1 ... 9, 10, 11, 12, 13  Next
Author Message
 Post subject: Re: Nexus -library of custom gadgets (updated : 28/7/09)
PostPosted: Sun Oct 04, 2009 4:29 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 9870
Location: Beyond the pale...
No problem. 8)

I'll include this version in the next update.

_________________
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 5:34 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Dec 21, 2008 5:02 pm
Posts: 609
Location: Aarhus, Denmark
Thanks!
btw you can always include both versions and let the user decide which to use.


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

Joined: Tue Jun 12, 2007 10:30 am
Posts: 615
Location: not there...
Arctic Fox and the man behind Arctic Reports...is this about an arctic Explorer :)

_________________
4.51 final:-) - Windows 7 :-) and sometimes still XP :-)


Top
 Profile  
 
 Post subject: Re: Nexus -library of custom gadgets (updated : 28/7/09)
PostPosted: Tue Nov 10, 2009 11:37 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Apr 25, 2003 5:10 pm
Posts: 413
Location: France (Doubs)
srod,
i'm a little bit lost with your nxgadget library :oops:
Could you help me to solve my problem ?

I use a nxSplitter with two area.
I will put in the first one, a textgadget and below a listicon.

I put textgadget and listicon inside a containergadget (wich is the gadget i put to splittergadget), my problem is that the container gadget is correctly resized when nxgadget dims changed but nothing arrive for textgadget & listicon. I have to resize them.
May be i have to use #nxSplitter_GadgetsResized msg witch seems to be dispached by nxSplitter_DespatchCallbackMessage() proc but how to do that ?

May i create a callback proc for that ?

How to give my callback proc address to nx functions ?

_________________
A+
Denis


Top
 Profile  
 
 Post subject: Re: Nexus -library of custom gadgets (updated : 28/7/09)
PostPosted: Tue Nov 10, 2009 12:11 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 9870
Location: Beyond the pale...
Hi Denis,

yes you can use the #nxSplitter_GadgetsResized message if you wish, though I normally just subclass the container gadget and look out for #WM_SIZE messages. I then resize the child-controls as appropriate (in your case the text gadget and listicon).

Here's an example of using the #nxSplitter_GadgetsResized message :

Code:
#INCLUDE_NEXUS_SPLITTER = 1  ;Declare this before including the Nexus source.

IncludePath "..\..\SOURCE\"
  XIncludeFile "nxGadgets.pbi"
IncludePath ""

;Gadget#.
  Enumeration
    #Container
    #Button1
    #ListIcon
    #Button2
    #Splitter
  EndEnumeration
 
;///////////////////////////////////////////////////////////////////////////////////////////
Procedure.l SplitterCallback(id, uMsg, wParam, lParam)
  Protected result = #True
  Select uMsg
    Case #nxSplitter_GadgetsResized
      If id = #Splitter
        ;Resize listicon.
        ;Note how we resize the width to keep pace with the container. This is to account for the user resizing the main window
        ;which will in turn resize the splitter control because of the #WM_SIZE handler below.
          ResizeGadget(#ListIcon, #PB_Ignore, #PB_Ignore, GadgetWidth(#Container), wParam - 42)
      EndIf
  EndSelect
  ProcedureReturn result
EndProcedure

If OpenWindow(0, 100, 100, 600, 600, "©nxSoftware - nxSplitter example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered | #PB_Window_SizeGadget | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget)

  ContainerGadget(#Container, 0, 0, 0, 0)
    ButtonGadget(#Button1, 10, 10, 80, 20, "HELLO!")
    ListIconGadget(#ListIcon, 0, 40, 0, 0, "ListIcon!", 120)
  CloseGadgetList()

  ButtonGadget(#Button2, 0,0,0,0, "CLICK")
  ;Create the nxSplitter.
    nxSplitter_Create(#Splitter, 10,10, WindowWidth(0)-20, WindowHeight(0)-20, #Container, #Button2, 3, #nxSplitter_GripperWithDrag, @SplitterCallback())


  Repeat
    Event = WaitWindowEvent()
    Select Event
      Case #WM_SIZE
        ResizeGadget(#Splitter, #PB_Ignore, #PB_Ignore, WindowWidth(0)-20, WindowHeight(0)-20)
    EndSelect
  Until Event = #PB_Event_CloseWindow
EndIf


I hope this helps.

_________________
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: Tue Nov 10, 2009 2:22 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Apr 25, 2003 5:10 pm
Posts: 413
Location: France (Doubs)
Many Thanks for example srod,
i'll take a closer look.

_________________
A+
Denis


Top
 Profile  
 
 Post subject: Re: Nexus -library of custom gadgets (updated : 28/7/09)
PostPosted: Tue Nov 10, 2009 2:55 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Apr 25, 2003 5:10 pm
Posts: 413
Location: France (Doubs)
Srod, it seems to be Ok.

Just 1 questions :

What is the default return value for the SplitterCallback() proc
In your example, it's #True, but in my code if i use #False, it' s Ok (see below my callback)

Tks :D

Code:
Procedure.l SplitterCallback(id, uMsg, wParam, lParam)
     Protected result
     Select uMsg
          Case #nxSplitter_GadgetsResized
               Select id
                    Case #Splitter_Separation_Icones, #Splitter_Horizontal
                         ;Resize listicon.
                         ;Note how we resize the width to keep pace with the container. This is to account for the user resizing the main window
                         ;which will in turn resize the splitter control because of the #WM_SIZE handler below.
                             ResizeGadget(#ListIcon_Group_icons, #PB_Ignore, #PB_Ignore, GadgetWidth(#Container_ListIcon_Group_icons), GadgetHeight(#Container_ListIcon_Group_icons) - #HauteurBarreSeparation)
                         result = #True
               EndSelect
               
          Case #nxSplitter_SliderAnchored
               nx_SetGadgetAttribute(id, #nxSplitter_SliderType, #nxSplitter_GripperWithNoDrag)
               result = #True
               
          Case #nxSplitter_AnchorReleased
               nx_SetGadgetAttribute(id, #nxSplitter_SliderType, #nxSplitter_GripperWithDrag)
               result = #True
               
          Case #nxSplitter_GripperClicked
               result = #False
     EndSelect
     
     ProcedureReturn result
EndProcedure

_________________
A+
Denis


Top
 Profile  
 
 Post subject: Re: Nexus -library of custom gadgets (updated : 28/7/09)
PostPosted: Tue Nov 10, 2009 4:49 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 9870
Location: Beyond the pale...
Well, there is no default really except to say that #True will ensure 'default behaviour' when (and if) appropriate for the individual message. Returning #False will occasionally prohibit certain actions 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: Tue Nov 10, 2009 6:33 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Apr 25, 2003 5:10 pm
Posts: 413
Location: France (Doubs)
Ok Srod anf Thanks again.

_________________
A+
Denis


Top
 Profile  
 
 Post subject: Re: Nexus -library of custom gadgets (updated : 28/7/09)
PostPosted: Sun Mar 07, 2010 4:40 pm 
Offline
Enthusiast
Enthusiast

Joined: Tue Jan 25, 2005 7:01 pm
Posts: 223
Location: France
Mmmh, I'm toying with the property box since a few minutes and I cannot change any value. I've tried thoses:

Quote:
nx_SetGadgetItemText(#PropertyBox,5,"152")
nx_SetGadgetItemState(#PropertyBox,5,152)
nx_SetGadgetItemData(#PropertyBox,5,152)


Since I'm a plain idiot, I would ask something like "pleaaaase, help"...


Top
 Profile  
 
 Post subject: Re: Nexus -library of custom gadgets (updated : 28/7/09)
PostPosted: Sun Mar 07, 2010 11:29 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 9870
Location: Beyond the pale...
Code:
nx_SetGadgetItemText(1, 1, "New value text!", #nxPropertyBox_ValueText)


Look in the nxGadgets_Residents.pbi file for a list of constants to use with nx_SetGadgetItemText() with regards the property box control.

Code:
    Enumeration
      #nxPropertyBox_LabelText = 1
      #nxPropertyBox_ValueText
      #nxPropertyBox_FontName
      #nxPropertyBox_FilePathSelectorTitle
      #nxPropertyBox_FileSelectorPattern
      #nxPropertyBox_FileName
      #nxPropertyBox_PathName
      #nxPropertyBox_ComboOptionsText
      #nxPropertyBox_LabelTextPriorToEdit  ;Get only.
                                           ;Only valid before the newly added text is accepted by the #nxPropertyBox_ItemUpdated message.
      #nxPropertyBox_ValueTextPriorToEdit  ;Get only.
                                           ;Only valid before the newly added text is accepted by the #nxPropertyBox_ItemUpdated message.

    EndEnumeration

_________________
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: Mon Mar 08, 2010 8:51 am 
Offline
Enthusiast
Enthusiast

Joined: Tue Jan 25, 2005 7:01 pm
Posts: 223
Location: France
Ohhh. I should have think of that. Thank you!


Top
 Profile  
 
 Post subject: Re: Nexus -library of custom gadgets (updated : 28/7/09)
PostPosted: Mon Apr 05, 2010 4:25 am 
Offline
Enthusiast
Enthusiast

Joined: Mon Jan 26, 2004 11:39 am
Posts: 288
Location: ITALY
Hi srod, :)
Only three questions:

1) Your Nexus gadgets works well with Pb 4.41 and Pb 4.50?

2) Your Split gadget works well with multiple groups of gadgets?
For example I can use your Split gadget between a ListIconGadget on the right and an EditorGadget with a StringGadget on the left (A gui like the mIRC program)?

3) The Split gadget work inside a PanelGadget?

Thanks :wink:


Top
 Profile  
 
 Post subject: Re: Nexus -library of custom gadgets (updated : 28/7/09)
PostPosted: Mon Apr 05, 2010 11:22 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 9870
Location: Beyond the pale...
Hi.

1) Yes. For the property-box control make sure you use the PB 4.5 compatible version of EsGRID.
2) Yes. *
3) Yes.

*Use a container gadget as one of the splitter's child controls. You will then need to take steps to resize the containers child gadgets whenever the splitter resizes the container etc. For this either subclass the container or use the #nxSplitter_GadgetsResized callback message. I advise the #nxSplitter_GadgetsResized message.

_________________
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: Thu Jun 03, 2010 9:34 pm 
Offline
User
User

Joined: Tue May 01, 2007 3:49 am
Posts: 97
Location: Germany
Hey srod,
thanks for this great lib! :)

Is there any way to make the items of the nxPropertyBox control readonly?


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


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