You're welcomeAndyMK wrote:Thank you

You're welcomeAndyMK wrote:Thank you
Hey Poshu,Poshu wrote:Mmmh, I have some redraw problem when a rebar width grows up; is there a way to add a callback that would allow me to resize and move my gadgets before the rebar is redrawn?
Code: Select all
Event = WaitWindowEvent()
window = EventWindow()
; resize scintilla gadget when rebar updated msg received
If Event = #REBAR_UPDATED
ResizeGadget(editor, 0, EventwParam(), WindowWidth(#Window_0), WindowHeight(#Window_0)-EventwParam())
EndIf
Ahh I see the problem now, the message gets posted after the rebar has already occupied the new space (overlapping existing gadgets for a brief moment). I'll make so the #REBAR_UPDATED message gets posted before the rebar redraws in the new release, that way theres no need for an extra callback. The new release is going good by the wayPoshu wrote:Oups, as always my english is confused, I meant height change, yeah.
With this example (which was what I was doing) my rebar is drawn before I can resize my gadgets, resulting some nice bugs. I wanted to resize my gadgets before any redraw of my rebar.
Achieved with a callback, thanks anyway.
Yep, that's exactly my point (damn, you're good when it comes to understand crappy english °_°; ) I do prefer callback for event handling anyway... Well, strange thing actually, I believe the high order word of lparam should contain the new height, but I just peek some strange numbers, what am I doing wrong?the message gets posted after the rebar has already occupied the new space (overlapping existing gadgets for a brief moment)
hehe your English isn't that crappyPoshu wrote:Yep, that's exactly my point (damn, you're good when it comes to understand crappy english °_°; ) I do prefer callback for event handling anyway... Well, strange thing actually, I believe the low high order word of lparam should contain the new height, but I just peek some strange numbers, what am I doing wrong?the message gets posted after the rebar has already occupied the new space (overlapping existing gadgets for a brief moment)
Edit: damn myself, I was peeka instead of peekw, nevermind.
Sweet!PrincieD wrote:fixed all the reported bugs now, wow! for once, i might actually make the estimated release date of sunday lol
Code: Select all
StartProGUI("",0,0,0,0,0,0,0)
OpenWindow(0,10,10,300,300,"Prululu",#PB_Window_SystemMenu)
ButtonGadget(1,150,150,50,20,"Nya")
CreateToolBarEx(2,WindowID(0),16,16, #TBSTYLE_HIDECLIPPEDBUTTONS)
ToolBarButtonEx(3, "Nyoron!", #BTNS_BUTTON)
ToolBarButtonEx(4, "Mugyu ?", #BTNS_BUTTON)
ToolBarButtonEx(5, "Gema...", #BTNS_BUTTON)
Repeat
Select WaitWindowEvent()
Case #PB_Event_Gadget
FreeToolBarEx(2)
CreateToolBarEx(2,WindowID(0),16,16, #TBSTYLE_HIDECLIPPEDBUTTONS)
ToolBarButtonEx(3, "Nyoron!", #BTNS_BUTTON)
ToolBarButtonEx(4, "Mugyu ?", #BTNS_BUTTON)
ToolBarButtonEx(5, "Gema...", #BTNS_BUTTON)
Case #PB_Event_CloseWindow
End
EndSelect
ForEver
I don't see this as an usefull feature. It might confuse users that are not familiar with callback and it's quite easy to subclass your gadget anyway.PrincieD wrote:I'll add a command to set a separate user-callback too if you prefer that method then
Thanks Poshu! I'll get onto it and I really do appreciate you reporting theses issues, it can be tricky accounting for all possible scenarios sometimes and it helps a lot when you let me know what needs fixing or improving. Keep em coming! The new update probably won't be ready just yet today but it's about 90% complete - probably late tonight maybe or sometime tomorrow (I have to update the docs and examples too, which will take a while - a lot of new API!).Poshu wrote: Sweet!
...
Then I think it's time for me to post my little planning-fucking wish list, right?
- •For an easier use of ProGUI, you should make the command list a bit more uniform, like why GetToolBarExHeight while RebarHeight? PureBasic convention seems to tell users that there is no "get" when we are looking for a size: WindowHeight, ImageHeight, GadgetHeight... (I know it's not really important, I just think that it would feel more natural)
- •Memory leaks: yeah, there is memory leaks almost everywhere, and it REALLY need to be fixed, here is an easy demonstration:
Code: Select all
StartProGUI("",0,0,0,0,0,0,0) OpenWindow(0,10,10,300,300,"Prululu",#PB_Window_SystemMenu) ButtonGadget(1,150,150,50,20,"Nya") CreateToolBarEx(2,WindowID(0),16,16, #TBSTYLE_HIDECLIPPEDBUTTONS) ToolBarButtonEx(3, "Nyoron!", #BTNS_BUTTON) ToolBarButtonEx(4, "Mugyu ?", #BTNS_BUTTON) ToolBarButtonEx(5, "Gema...", #BTNS_BUTTON) Repeat Select WaitWindowEvent() Case #PB_Event_Gadget FreeToolBarEx(2) CreateToolBarEx(2,WindowID(0),16,16, #TBSTYLE_HIDECLIPPEDBUTTONS) ToolBarButtonEx(3, "Nyoron!", #BTNS_BUTTON) ToolBarButtonEx(4, "Mugyu ?", #BTNS_BUTTON) ToolBarButtonEx(5, "Gema...", #BTNS_BUTTON) Case #PB_Event_CloseWindow End EndSelect ForEver
- Just press the self-explanatory
"nya" button and enjoy your ram consumption growing up!
- •It would be nice to be able to get a rebarband ID after it's creation (something like RebarBandID(RebarID.i,GadgetID.i)?)
- •More to come, I swear.
I don't see this as an usefull feature. It might confuse users that are not familiar with callback and it's quite easy to subclass your gadget anyway.PrincieD wrote:I'll add a command to set a separate user-callback too if you prefer that method then