This seems ideal. You could have a TrialPay button for the 12 month system.One for full updates for life and another for 12 months access to updates
Nexus -library of custom gadgets (32-bit / 64-bit)
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Possible bug in nxSplitter when using a combobox (PB 4.3)...
The normal splitter resizes ok (the combobox should be full splitter height).
EDIT:
If you change the back to in 'nxSplitter_PositionGadgets' it works correctly.
Code: Select all
#INCLUDE_NEXUS_SPLITTER = 1 ;Declare this before including the Nexus source.
XIncludeFile "nxGadgets.pbi"
;///////////////////////////////////////////////////////////////////////////////////////////
Procedure.l SplitterCallback(id, uMsg, wParam, lParam)
Protected result = #True
Select uMsg
Case #nxSplitter_SliderAnchored
nx_SetGadgetAttribute(id, #nxSplitter_SliderType, #nxSplitter_GripperWithNoDrag)
Case #nxSplitter_AnchorReleased
nx_SetGadgetAttribute(id, #nxSplitter_SliderType, #nxSplitter_GripperWithDrag)
;Uncomment the following to prevent the anchored gadget being alternated.
;Instead we ensure that only the first gadget is collapsed and anchored etc.
; Case #nxSplitter_GripperClicked
; result = #nxSplitter_AnchorFirstGadget
EndSelect
ProcedureReturn result
EndProcedure
If OpenWindow(0, 100, 100, 600, 600, "©nxSoftware - nxSplitter example 2", #PB_Window_SystemMenu | #PB_Window_ScreenCentered | #PB_Window_SizeGadget | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget)
ComboBoxGadget(1, 0,0,0,0)
ButtonGadget(2, 0,0,0,0, "CLICK 2")
EditorGadget(3,0,0,0,0)
;Create the two nxSplitters.
nxSplitter_Create(4, 0,0, 0, 0, 1, 2, 3, #nxSplitter_Vertical|#nxSplitter_GripperWithDrag, @SplitterCallback())
nxSplitter_Create(5, 40,40, WindowWidth(0)-80, WindowHeight(0)-80, 3, 4, 3, #nxSplitter_GripperWithDrag, @SplitterCallback())
;Set the color of the 'anchored sliders'.
nx_SetGadgetColor(4, #nxSplitter_AnchoredSliderColor, #Black)
nx_SetGadgetColor(5, #nxSplitter_AnchoredSliderColor, #Black)
Repeat
Event = WaitWindowEvent()
Select Event
Case #WM_SIZE
ResizeGadget(5, #PB_Ignore, #PB_Ignore, WindowWidth(0)-120, WindowHeight(0)-80)
Case #PB_Event_Gadget
Select EventGadget()
EndSelect
EndSelect
Until Event = #PB_Event_CloseWindow
EndIf
End
;///////////////////////////////////////////////////////////////////////////////////////////
EDIT:
If you change the
Code: Select all
MoveWindow_(GadgetID(*nx\gad...
Code: Select all
ResizeGadget(*nx\gad...
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
It doesn't work here with or without ResizeGadget() and it doesn't work with PB's regular splitter gadget either in that I can get that to misbehave as well. The thing with nxSplitter is that it assumes both child gadgets completely fill the client area of the splitter and thus doesn't bother erasing any unused space - because there will not be any. PB's splitter does not make this assumption and thus it is a little harder to get it to misbehave with a combo.
The problem seems to be that there is a height limit for the selection field of a combo-box gadget. I'll have to take a look on MSDN about this.
**EDIT : yes there is a max limit to the height you can set for a combo's selection field which is at the heart of the problem here. As I say PB's splitter gadget is not immune to this although it does handle things better in this respect. I guess the message is; do not use a combo in an nxSplitter gadget.
The best I can do is probably have nxSplitter act more gracefully in these situations; effectively mimicking PB's splitter's behaviour here.
The problem seems to be that there is a height limit for the selection field of a combo-box gadget. I'll have to take a look on MSDN about this.
**EDIT : yes there is a max limit to the height you can set for a combo's selection field which is at the heart of the problem here. As I say PB's splitter gadget is not immune to this although it does handle things better in this respect. I guess the message is; do not use a combo in an nxSplitter gadget.

I may look like a mule, but I'm not a complete ass.
@Anthony, could you please test the latest version (PB 4.3 only).
Following a resize, the nxSplitter lib now examines each child gadget in turn to see if the child completely fills it's allotted space; if not some custom erasing ensues. This seems to be similar to what PB's splitter does and certainly removes the problems that I could see on my machine (Vista + XP).
As far as combo's are concerned; keeping the MoveWindow_() (which is my preferred option because there is far less flicker) means that the drop down list is resized. If you wish to switch to ResizeGadget() then the selection field will be resized up to the maximum etc. It's a matter of personal preference, but bear in mind that some other gadgets will flicker a lot more by using ResizeGadget().
Following a resize, the nxSplitter lib now examines each child gadget in turn to see if the child completely fills it's allotted space; if not some custom erasing ensues. This seems to be similar to what PB's splitter does and certainly removes the problems that I could see on my machine (Vista + XP).
As far as combo's are concerned; keeping the MoveWindow_() (which is my preferred option because there is far less flicker) means that the drop down list is resized. If you wish to switch to ResizeGadget() then the selection field will be resized up to the maximum etc. It's a matter of personal preference, but bear in mind that some other gadgets will flicker a lot more by using ResizeGadget().
I may look like a mule, but I'm not a complete ass.
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
How about checking the gadget type - if combo use resize, else use move?
Will check the new code soon - just trying to fix the car!
Will check the new code soon - just trying to fix the car!

https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
I actually like the combo the way it is with MoveWindow_(), so I won't be making use of ResizeGadget() in this case. Feel free to add that yourself though (but of course any such alterations will not be added to the official download etc.)DoubleDutch wrote:How about checking the gadget type - if combo use resize, else use move?
Will check the new code soon - just trying to fix the car!
Fix the car... ah give it a kick; that's what I do! Who needs to service a car when a good kicking usually works just as well!

I may look like a mule, but I'm not a complete ass.
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
The new routine works (the corruption is gone), but here is the (slightly) modded routine for anyone who wants the special case ComboBox mod.
This way the combobox will take on the new 4.30 'look'.
The car needs a new ignition barrel - too worn.
Code: Select all
;The following procedure positions and resizes the child gadgets following a resize etc.
Procedure nxSplitter_PositionGadgets(*nx._nxsplitter)
Protected rc.rect, hWnd, width, height
; If nxSplitter_IsChildGadget(*nx, *nx\gad1) And nxSplitter_IsChildGadget(*nx, *nx\gad2) ;Just to be safe.
hWnd = GadgetID(*nx\ctrlID)
GetClientRect_(hWnd, rc)
If *nx\styles&#nxSplitter_Vertical
width = *nx\splitterPos-#_nxsplitter_margin
If width < 0 : width = 0 : EndIf
If nxSplitter_IsChildGadget(*nx, *nx\gad1)
If GadgetType(*nx\gad1)=#PB_GadgetType_ComboBox
ResizeGadget(*nx\gad1, 0, 0, width, rc\bottom)
Else
MoveWindow_(GadgetID(*nx\gad1), 0, 0, width, rc\bottom,0)
EndIf
EndIf
width = rc\right - *nx\splitterPos - #_nxsplitter_margin - *nx\sliderWidth
If width < 0 : width = 0 : EndIf
If nxSplitter_IsChildGadget(*nx, *nx\gad2)
If GadgetType(*nx\gad2)=#PB_GadgetType_ComboBox
ResizeGadget(*nx\gad2, *nx\splitterPos+#_nxsplitter_margin+*nx\sliderWidth, 0, width, rc\bottom)
Else
MoveWindow_(GadgetID(*nx\gad2), *nx\splitterPos+#_nxsplitter_margin+*nx\sliderWidth, 0, width, rc\bottom,0)
EndIf
EndIf
Else
height = *nx\splitterPos-#_nxsplitter_margin
If height < 0 : height = 0 : EndIf
If nxSplitter_IsChildGadget(*nx, *nx\gad1)
If GadgetType(*nx\gad1)=#PB_GadgetType_ComboBox
ResizeGadget(*nx\gad1, 0, 0, rc\right, height)
Else
MoveWindow_(GadgetID(*nx\gad1), 0, 0, rc\right, height, 0)
EndIf
EndIf
height = rc\bottom - *nx\splitterPos - #_nxsplitter_margin - *nx\sliderWidth
If height < 0 : height = 0 : EndIf
If nxSplitter_IsChildGadget(*nx, *nx\gad2)
If GadgetType(*nx\gad1)=#PB_GadgetType_ComboBox
ResizeGadget(*nx\gad2, 0, *nx\splitterPos+#_nxsplitter_margin+*nx\sliderWidth, rc\right, height)
Else
MoveWindow_(GadgetID(*nx\gad2), 0, *nx\splitterPos+#_nxsplitter_margin+*nx\sliderWidth, rc\right, height, 0)
EndIf
EndIf
EndIf
; EndIf
EndProcedure
The car needs a new ignition barrel - too worn.
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
nxExplorerBar controls. (19th December 2008)
Updated the version of this control in the Purebasic 4.3 version (the version of Nexus for PB 4.2 is no longer supported).
You can now hide an entire group by simply setting the header item to have a height of zero (of course this only works if the group has a header item!) You can set this height at any time through the nx_SetGadgetItemAttribute() function.
Also fixed some bugs with this control.

Updated the version of this control in the Purebasic 4.3 version (the version of Nexus for PB 4.2 is no longer supported).
You can now hide an entire group by simply setting the header item to have a height of zero (of course this only works if the group has a header item!) You can set this height at any time through the nx_SetGadgetItemAttribute() function.
Also fixed some bugs with this control.

I may look like a mule, but I'm not a complete ass.
Donation done! 
.
.
.
and... a request
(for nxExplorerBar)
- Customize Icons Size for panels Header (currently fixed to 48x48), so it affect too to:
Thank you Srod for your useful codes

.
.
.
and... a request

- Customize Icons Size for panels Header (currently fixed to 48x48), so it affect too to:
Code: Select all
;//line 608 of nxEplorerBar.pbi (PB4.30)
If *nxItem\hIcon
rcTemp\left = #_nxexplorerbar_margin+45
rcTemp\right = rcTemp\left + width-35
...
PB 6.21 beta, PureVision User
First you can use icons of any size as nxExplorerBar resizes as appropriate etc.
Altering the displayed icon size will require alterations to the positioning etc. Still easy enough to alter if you wish to. I will not alter my version however because previous tests simply didn't look good with icons of different sizes.
**EDIT : thanks for the donation; much appreciated.
Altering the displayed icon size will require alterations to the positioning etc. Still easy enough to alter if you wish to. I will not alter my version however because previous tests simply didn't look good with icons of different sizes.
**EDIT : thanks for the donation; much appreciated.

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

I already have a modified version for 24x24 icons and fixed margin:


But I'll need to re-modify NxExplorerBar.ini with each update.
Don't worry, it isen't a hard job.

--- more help required ---
How can I change a MenuItemDescription ForeColor?
Code: Select all
#MENU_LATERAL = 1
Global TextoEstado.L
nxExplorerBar_Create(#MENU_LATERAL, 0, TBheight(#TB_Principal),MenuLateralAncho, Galtura, @ExplorerBarCallback())
Global nxEBItem.nxExplorerBar_NewItem
nxEBItem\type = #nxExplorerBar_Description
nxEBItem\font = FontID(LoadFont(#PB_Any, "Arial",10,#PB_Font_Bold))
TextoEstado = nx_AddGadgetItem(1, -1, "DESACTIVADO!", 0, nxEBItem)
...
;MAIN
nxExplorerBar_SetGadgetItemAttribute(#MENU_LATERAL, TextoEstado, #nxExplorerBar_DescriptionForeColor, #Red)
PB 6.21 beta, PureVision User
Well, about previous reply and to resume:
have you a code sample for?:
Thank you and sorry for my short mind 
have you a code sample for?:
Code: Select all
nxExplorerBar_SetGadgetItemAttribute(menuid, itemid, #nxExplorerBar_DescriptionForeColor, MyColor)

PB 6.21 beta, PureVision User
No, you need to look in the "nxGadgets_Residents.pbi" file for a list of constants you can use with nx_SetGadgetItemAttribute() and #nxExplorerBar_DescriptionForeColor is NOT one of them!
To change the menu description fore colors you need to use nx_SetGadgetColor() and this will change the fore color of ALL menu descriptors. You cannot alter the color of individual descriptor items.
Use something like :
**EDIT : actually I cannot remember why I didn't allow for coloring indvidual descriptor items? It would be easy to add. Oh well, maybe later...

To change the menu description fore colors you need to use nx_SetGadgetColor() and this will change the fore color of ALL menu descriptors. You cannot alter the color of individual descriptor items.
Use something like :
Code: Select all
nx_SetGadgetColor(1, #nxExplorerBar_DescriptionForeColor, #Red)
I may look like a mule, but I'm not a complete ass.

Oh!, don't worry for this, I always can put a #nxExplorerBar_Container with standar PB TextGadgets.
Really grateful!
PB 6.21 beta, PureVision User