ProGUI V1.38 UI Library (Small Bug Fix)

Developed or developing a new product in PureBasic? Tell the world about it.
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.18! User Interface Library (New PanelEx Scroll

Post by PrincieD »

Barney wrote:
PrincieD wrote:Thanks very much Barney :D Just out of interest, what other language is the wrapper for? Glad it's all working anyway :)
Hi Chris,

the other language is IWBasic previously known as Emergence Basic but now under completely new management.

I've been testing your lib with it while at the same time changing some of my applications into new look and so far everything is working as expected. I must admit you've saved me a lot of time with your lib. I know I could have done it either in PB or IWB on my own but it would take ages. This way I have everything ready and as far as I can tell without any "show stoppers", so the money spent for the lib was (in my case) money well spent. Thank you.

Barney
You're very welcome Barney :) it's good to know that it's helping a lot and shortening that all important dev time!
The scrolling support for the PanelEx has been especially important in this release, it allows for the quick, easy creation of very complex customizable controls. So expect some nice new control updates soon in the future :)

Cheers!

Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
Poshu
Enthusiast
Enthusiast
Posts: 459
Joined: Tue Jan 25, 2005 7:01 pm
Location: Canada

Re: ProGUI V1.18! User Interface Library (New PanelEx Scroll

Post by Poshu »

I'm wondering, is there any way to use progui's menuEX (wich I love, by the way <3) with a mdi gadget? (Need to display the minimize/close button when a mdi child window is maximized)
AndyMK
Enthusiast
Enthusiast
Posts: 582
Joined: Wed Jul 12, 2006 4:38 pm
Location: UK

Re: ProGUI V1.18! User Interface Library (New PanelEx Scroll

Post by AndyMK »

Is there any way to change a popup menu items text colour? I tried

Code: Select all

 SetUIColour(#UISTYLE_OFFICE2007, #menuTextColor,RGB(255, 0, 0), #UICOLOURMODE_CUSTOM, #True)
no change. I also want to change the colour strip behind the icons in popup menu to black.
Image
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.18! User Interface Library (New PanelEx Scroll

Post by PrincieD »

Poshu wrote:I'm wondering, is there any way to use progui's menuEX (wich I love, by the way <3) with a mdi gadget? (Need to display the minimize/close button when a mdi child window is maximized)
Hey poshu, doesn't creating the MenuEx in the MDI window work? or Rebar containing MenuEx inside the MDI?
AndyMK wrote:Is there any way to change a popup menu items text colour? I tried
Andy, can you post the code that you have so far and i'll take a look. I might have to do a small fix to ProGUI.

Cheers!

Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
AndyMK
Enthusiast
Enthusiast
Posts: 582
Joined: Wed Jul 12, 2006 4:38 pm
Location: UK

Re: ProGUI V1.18! User Interface Library (New PanelEx Scroll

Post by AndyMK »

PrincieD wrote:
Poshu wrote:I'm wondering, is there any way to use progui's menuEX (wich I love, by the way <3) with a mdi gadget? (Need to display the minimize/close button when a mdi child window is maximized)
Hey poshu, doesn't creating the MenuEx in the MDI window work? or Rebar containing MenuEx inside the MDI?
AndyMK wrote:Is there any way to change a popup menu items text colour? I tried
Andy, can you post the code that you have so far and i'll take a look. I might have to do a small fix to ProGUI.

Cheers!

Chris.

Code: Select all

; Remember to enable XP Skin Support!
; Demonstrates how to use rebars

CompilerIf Defined(StartProGUI, #PB_Function) = #False
  IncludeFile "ProGUI_PB.pb"
CompilerEndIf
StartProGUI("", 0, 0, 0, 0, 0, 0, 0)

;- Window Constants
Enumeration
  #Window_0
EndEnumeration

;- Gadget Constants
Enumeration
  #MENU_1
  #REBAR_0
  #PopupMenu_0
  #PopupMenu_1
  #TOOLBAR_0
EndEnumeration


; set up structure for easy access to icon images
Structure images
  normal.i
  hot.i
  disabled.i
EndStructure
Global Dim image.images(36)

; load in some example icons
; a more efficient way to load your icon images is to have them
; stored in your exe's resource, in order to load them use the following line:
; image = LoadImage_(GetModuleHandle_(0), "name of icon in resource", #IMAGE_ICON, 16, 16, 0)
; doing this allows you to choose the size of icon stored in the ico file too.
image(0)\normal = LoadImage_(GetModuleHandle_(0), "icons\cut.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(0)\hot = LoadImage_(GetModuleHandle_(0), "icons\cut_h.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(0)\disabled = LoadImage_(GetModuleHandle_(0), "icons\cut_d.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)

image(1)\normal = LoadImage_(GetModuleHandle_(0), "icons\paste.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(1)\hot = LoadImage_(GetModuleHandle_(0), "icons\paste_h.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(1)\disabled = LoadImage_(GetModuleHandle_(0), "icons\paste_d.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)

image(2)\normal = LoadImage_(GetModuleHandle_(0), "icons\image.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(2)\hot = LoadImage_(GetModuleHandle_(0), "icons\image_h.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(2)\disabled = LoadImage_(GetModuleHandle_(0), "icons\image_d.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)

image(3)\normal = LoadImage_(GetModuleHandle_(0), "icons\multimedia.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(3)\hot = LoadImage_(GetModuleHandle_(0), "icons\multimedia_h.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(3)\disabled = LoadImage_(GetModuleHandle_(0), "icons\multimedia_d.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)

image(4)\normal = LoadImage_(GetModuleHandle_(0), "icons\package.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(4)\hot = LoadImage_(GetModuleHandle_(0), "icons\package_h.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(4)\disabled = LoadImage_(GetModuleHandle_(0), "icons\package_d.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)

image(5)\normal = LoadImage_(GetModuleHandle_(0), "icons\preferences.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(5)\hot = LoadImage_(GetModuleHandle_(0), "icons\preferences_h.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(5)\disabled = LoadImage_(GetModuleHandle_(0), "icons\preferences_d.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)

image(6)\normal = LoadImage_(GetModuleHandle_(0), "icons\jump.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(6)\hot = LoadImage_(GetModuleHandle_(0), "icons\jump_h.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(6)\disabled = LoadImage_(GetModuleHandle_(0), "icons\jump_d.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)

image(19)\normal = LoadImage_(GetModuleHandle_(0), "icons\copy doc.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(19)\hot = LoadImage_(GetModuleHandle_(0), "icons\copy doc_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(19)\disabled = LoadImage_(GetModuleHandle_(0), "icons\copy doc_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)

image(20)\normal = LoadImage_(GetModuleHandle_(0), "icons\computer on.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(20)\hot = LoadImage_(GetModuleHandle_(0), "icons\computer on_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(20)\disabled = LoadImage_(GetModuleHandle_(0), "icons\computer on_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)

image(21)\normal = LoadImage_(GetModuleHandle_(0), "icons\search.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(21)\hot = LoadImage_(GetModuleHandle_(0), "icons\search_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(21)\disabled = LoadImage_(GetModuleHandle_(0), "icons\search_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)


image(7)\normal = LoadImage_(GetModuleHandle_(0), "icons\advanced.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(7)\hot = LoadImage_(GetModuleHandle_(0), "icons\advanced_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(7)\disabled = LoadImage_(GetModuleHandle_(0), "icons\advanced_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)

image(8)\normal = LoadImage_(GetModuleHandle_(0), "icons\back_alt.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(8)\hot = LoadImage_(GetModuleHandle_(0), "icons\back_alt_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(8)\disabled = LoadImage_(GetModuleHandle_(0), "icons\back_alt_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)

image(9)\normal = LoadImage_(GetModuleHandle_(0), "icons\color.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(9)\hot = LoadImage_(GetModuleHandle_(0), "icons\color_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(9)\disabled = LoadImage_(GetModuleHandle_(0), "icons\color_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)

image(10)\normal = LoadImage_(GetModuleHandle_(0), "icons\computer on.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(10)\hot = LoadImage_(GetModuleHandle_(0), "icons\computer on_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(10)\disabled = LoadImage_(GetModuleHandle_(0), "icons\computer on_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)

image(11)\normal = LoadImage_(GetModuleHandle_(0), "icons\copy doc.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(11)\hot = LoadImage_(GetModuleHandle_(0), "icons\copy doc_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(11)\disabled = LoadImage_(GetModuleHandle_(0), "icons\copy doc_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)

image(12)\normal = LoadImage_(GetModuleHandle_(0), "icons\movies.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(12)\hot = LoadImage_(GetModuleHandle_(0), "icons\movies_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(12)\disabled = LoadImage_(GetModuleHandle_(0), "icons\movies_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)

image(13)\normal = LoadImage_(GetModuleHandle_(0), "icons\new archive.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(13)\hot = LoadImage_(GetModuleHandle_(0), "icons\new archive_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(13)\disabled = LoadImage_(GetModuleHandle_(0), "icons\new archive_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)

image(14)\normal = LoadImage_(GetModuleHandle_(0), "icons\new doc.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(14)\hot = LoadImage_(GetModuleHandle_(0), "icons\new doc_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(14)\disabled = LoadImage_(GetModuleHandle_(0), "icons\new doc_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)

image(15)\normal = LoadImage_(GetModuleHandle_(0), "icons\refresh.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(15)\hot = LoadImage_(GetModuleHandle_(0), "icons\refresh_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(15)\disabled = LoadImage_(GetModuleHandle_(0), "icons\refresh_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)

image(16)\normal = LoadImage_(GetModuleHandle_(0), "icons\search.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(16)\hot = LoadImage_(GetModuleHandle_(0), "icons\search_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(16)\disabled = LoadImage_(GetModuleHandle_(0), "icons\search_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)

image(17)\normal = LoadImage_(GetModuleHandle_(0), "icons\stop.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(17)\hot = LoadImage_(GetModuleHandle_(0), "icons\stop_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(17)\disabled = LoadImage_(GetModuleHandle_(0), "icons\stop_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)

image(18)\normal = LoadImage_(GetModuleHandle_(0), "icons\music 2.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(18)\hot = LoadImage_(GetModuleHandle_(0), "icons\music 2_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(18)\disabled = LoadImage_(GetModuleHandle_(0), "icons\music 2_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)


; creates a window
Procedure Open_Window_0()

  OpenWindow(#Window_0, 0, 0, 720, 500, "RebarExample 2", #PB_Window_ScreenCentered | #PB_Window_MinimizeGadget | #PB_Window_Invisible)

  ; this next command is important as it sets are newly created window to clipchildren
  ; which stops all the child components from being redrawn when unnessasery (reduced flickering, faster refresh)
  SetWindowLongPtr_(WindowID(#Window_0), #GWL_STYLE, GetWindowLongPtr_(WindowID(#Window_0), #GWL_STYLE)|#WS_CLIPCHILDREN)
  SetWindowColor(0,0)
  SetUIColourMode(#UICOLOURMODE_CUSTOM)

  ; create popupmenu
  SetMenuExImageSize(16,16)
  popupmenu = CreatePopupMenuEx(#PopupMenu_0, #UISTYLE_OFFICE2007)
  MenuItemEx(#PopupMenu_0, "Test menu", image(20)\normal, image(20)\hot, image(20)\disabled, 0)
  MenuBarEx()
  MenuItemEx(#PopupMenu_1, "Another one!", image(21)\normal, image(21)\hot, image(21)\disabled, 0)
  SetMenuExItemState(popupmenu, #PopupMenu_1, #ItemEx_Showcheckbox)

  ;create toolbar
  toolbar = CreateToolBarEx(#TOOLBAR_0, WindowID(#Window_0), 32, 32, #TBSTYLE_HIDECLIPPEDBUTTONS|#UISTYLE_OFFICE2007)

  ToolBarImageButtonEx(0, "Preferences", image(7)\normal, image(7)\hot, image(7)\disabled, #BTNS_AUTOSIZE|#BTNS_CHECKGROUP)
  SelectToolbarExButton(#TOOLBAR_0, 0, 1)
  ToolBarImageButtonEx(2, "Back", image(8)\normal, image(8)\hot, image(8)\disabled, #BTNS_AUTOSIZE|#BTNS_CHECKGROUP)
  ToolBarImageButtonEx(3, "Colours", image(9)\normal, image(9)\hot, image(9)\disabled, #BTNS_AUTOSIZE|#BTNS_CHECKGROUP)
  ToolBarImageButtonEx(4, "", 0, 0, 0, #BTNS_SEP)
  ToolBarImageButtonEx(5, "Computer", image(10)\normal, image(10)\hot, image(10)\disabled, #BTNS_AUTOSIZE)
  ToolBarImageButtonEx(6, "Copy Document", image(11)\normal, image(11)\hot, image(11)\disabled, #BTNS_AUTOSIZE)
  ToolBarImageButtonEx(7, "Movies", image(12)\normal, image(12)\hot, image(12)\disabled, #BTNS_AUTOSIZE)
  ToolBarImageButtonEx(8, "Archive", image(13)\normal, image(13)\hot, image(13)\disabled, #BTNS_AUTOSIZE)
  ToolBarImageButtonEx(9, "New Document", image(14)\normal, image(14)\hot, image(14)\disabled, #BTNS_AUTOSIZE)
  ToolBarDropdownImageButtonEx(10, popupmenu, "Refresh", image(15)\normal, image(15)\hot, image(15)\disabled, #BTNS_AUTOSIZE|#BTNS_WHOLEDROPDOWN)
  ToolBarImageButtonEx(11, "", 0, 0, 0, #BTNS_SEP)
  ToolBarImageButtonEx(12, "Search", image(16)\normal, image(16)\hot, image(16)\disabled, #BTNS_AUTOSIZE|#BTNS_CHECK)
  ToolBarImageButtonEx(13, "Stop", image(17)\normal, image(17)\hot, image(17)\disabled, #BTNS_AUTOSIZE)
  ToolBarImageButtonEx(14, "Music", image(18)\normal, image(18)\hot, image(18)\disabled, #BTNS_AUTOSIZE)

  DisableToolbarExButton(#TOOLBAR_0, 6, 1)
  DisableToolbarExButton(#TOOLBAR_0, 7, 1)

  ; create a rebar
  CreateRebar(#REBAR_0, WindowID(#Window_0), 0, #UISTYLE_OFFICE2007|#RBS_VARHEIGHT, 0)
  AddRebarGadget(toolbar, "",650, 0, 0, 0, #RBBS_BREAK|#RBBS_CHILDEDGE|#RBBS_USECHEVRON)

  ; Rebar
  SetUIColour(#UISTYLE_OFFICE2007, #rebarBackground1, RGB(0, 0, 0), #UICOLOURMODE_CUSTOM, #False) ; gradient 1
  SetUIColour(#UISTYLE_OFFICE2007, #rebarBackground2, RGB(0, 0, 0), #UICOLOURMODE_CUSTOM, #False); gradient 2
  SetUIColour(#UISTYLE_OFFICE2007, #menuTitleHotTextColor, RGB(0, 0, 0), #UICOLOURMODE_CUSTOM, #False)
  SetUIColour(#UISTYLE_OFFICE2007, #gripperShadow, RGB(0, 0, 0), #UICOLOURMODE_CUSTOM, #False)
  ;Menu button
  SetUIColour(#UISTYLE_OFFICE2007, #menuHeldGradientColor1, RGB(0, 0, 0), #UICOLOURMODE_CUSTOM, #False) ; gradient 1
  SetUIColour(#UISTYLE_OFFICE2007, #menuHeldGradientColor2, RGB(255, 0, 0), #UICOLOURMODE_CUSTOM, #False); gradient 2
  SetUIColour(#UISTYLE_OFFICE2007, #background, RGB(0, 0, 0), #UICOLOURMODE_CUSTOM, #False)
  SetUIColour(#UISTYLE_OFFICE2007, #menuTextColor,RGB(255, 255, 255), #UICOLOURMODE_CUSTOM, #False)
  ; Toolstrip
  SetUIColour(#UISTYLE_OFFICE2007, #toolstripBackground1, RGB(100, 100, 100), #UICOLOURMODE_CUSTOM, #False) ; gradient 1
  SetUIColour(#UISTYLE_OFFICE2007, #toolstripBackground2, RGB(50, 50, 50), #UICOLOURMODE_CUSTOM, #False) ; gradient 2
  SetUIColour(#UISTYLE_OFFICE2007, #toolstripBackground3, RGB(25, 25, 25), #UICOLOURMODE_CUSTOM, #False) ; gradient 3
  SetUIColour(#UISTYLE_OFFICE2007, #toolstripBackground4, RGB(0, 0, 0), #UICOLOURMODE_CUSTOM, #False) ; gradient 4
  SetUIColour(#UISTYLE_OFFICE2007, #toolstripShadow, RGB(0, 0, 0), #UICOLOURMODE_CUSTOM, #False)
  SetUIColour(#UISTYLE_OFFICE2007, #SelectGradientColor1, RGB(0,0, 0), #UICOLOURMODE_CUSTOM, #False)
  SetUIColour(#UISTYLE_OFFICE2007, #SelectGradientColor2, RGB(255, 0, 0), #UICOLOURMODE_CUSTOM, #False)
  SetUIColour(#UISTYLE_OFFICE2007, #StickySelectGradientColor1, RGB(0, 0, 0), #UICOLOURMODE_CUSTOM, #False)
  SetUIColour(#UISTYLE_OFFICE2007, #StickySelectGradientColor2, RGB(255, 0, 0), #UICOLOURMODE_CUSTOM, #False)
  SetUIColour(#UISTYLE_OFFICE2007, #StickySelectBorderColor, RGB(0, 0, 0), #UICOLOURMODE_CUSTOM, #False)
  SetUIColour(#UISTYLE_OFFICE2007, #toolbarHotGradientColor1, RGB(0, 0, 0), #UICOLOURMODE_CUSTOM, #False)
  SetUIColour(#UISTYLE_OFFICE2007, #toolbarHotGradientColor2, RGB(255, 0, 0), #UICOLOURMODE_CUSTOM, #False)
  SetUIColour(#UISTYLE_OFFICE2007, #toolbarButtonTextColor, RGB(255, 255, 255), #UICOLOURMODE_CUSTOM, #False)
  SetUIColour(#UISTYLE_OFFICE2007, #toolbarButtonHotTextColor, RGB(255, 255, 255), #UICOLOURMODE_CUSTOM, #False)
  SetUIColour(#UISTYLE_OFFICE2007, #toolbarButtonDisabledTextColor, RGB(0, 0, 0), #UICOLOURMODE_CUSTOM, #False)
  SetUIColour(#UISTYLE_OFFICE2007, #toolbarSeparator, RGB(50, 50, 50), #UICOLOURMODE_CUSTOM, #False)
  SetUIColour(#UISTYLE_OFFICE2007, #toolbarSeparatorShadow, RGB(25, 25, 25), #UICOLOURMODE_CUSTOM, #False)
  SetUIColour(#UISTYLE_OFFICE2007, #toolbarSeparatorShadow, RGB(0, 0, 0), #UICOLOURMODE_CUSTOM, #True) ; refresh any components already created

EndProcedure


Open_Window_0() ; create window
HideWindow(0, 0)  ; show our newly created window



; enter main event loop
Repeat


  Event = WaitWindowEvent()
  window = EventWindow()

  If Event = #PB_Event_Menu
    MenuID = EventMenu()
    Debug MenuID
  EndIf


Until Event = #WM_CLOSE
AndyMK
Enthusiast
Enthusiast
Posts: 582
Joined: Wed Jul 12, 2006 4:38 pm
Location: UK

Re: ProGUI V1.18! User Interface Library (New PanelEx Scroll

Post by AndyMK »

Can i have a sub menu on a toolbar dropdown image button?

*update*

I figured it out but i think there is a bug with office2003/2007 styles where the menu highlighting does not disappear moving from one item to another
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.18! User Interface Library (New PanelEx Scroll

Post by PrincieD »

Andy, I've fixed the small bug with menu text colour - I'll have a new release ready soon.
To change the bar colour of the menu (behind the icons) use:

Code: Select all

SetUIColour(#UISTYLE_OFFICE2007, #barGradientColor1, RGB(0, 0, 0), #UICOLOURMODE_CUSTOM, #False)
SetUIColour(#UISTYLE_OFFICE2007, #barGradientColor2, RGB(0, 0, 0), #UICOLOURMODE_CUSTOM, #False)
SetUIColour(#UISTYLE_OFFICE2007, #barGradientColor3, RGB(0, 0, 0), #UICOLOURMODE_CUSTOM, #False)
SetUIColour(#UISTYLE_OFFICE2007, #barGradientColor4, RGB(0, 0, 0), #UICOLOURMODE_CUSTOM, #False)
Could you give me some example source of the other bug?

Cheers!

Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
Poshu
Enthusiast
Enthusiast
Posts: 459
Joined: Tue Jan 25, 2005 7:01 pm
Location: Canada

Re: ProGUI V1.18! User Interface Library (New PanelEx Scroll

Post by Poshu »

Hey poshu, doesn't creating the MenuEx in the MDI window work? or Rebar containing MenuEx inside the MDI?
As always, I fail to explain my point in english so... Here is a code:

Code: Select all

CreateMenu(0,OpenWindow(0,0,0,500,400,"MDI with PB native menu",#PB_Window_SystemMenu))
MenuTitle("Project")
MenuItem(1, "Open"   +Chr(9)+"Ctrl+O")
MenuItem(2, "Save"   +Chr(9)+"Ctrl+S")
MenuItem(3, "Save as"+Chr(9)+"Ctrl+A")
MenuItem(4, "Close"  +Chr(9)+"Ctrl+C")
MDIGadget(0,35,35,200,200,0,5)
AddGadgetItem(0,2,"MDI Child")
SetWindowState(2,#PB_Window_Maximize)

StartProGUI("", 0, 0, 0, 0, 0, 0, 0)
CreateMenuEx(5, OpenWindow(1,50,50,500,400,"MDI with Progui menu",#PB_Window_SystemMenu), #UISTYLE_WHIDBEY)
MenuTitleEx("Project")
MenuItemEx(6,"Open",0,0,0,0)
MenuItemEx(7,"Save",0,0,0,0)
MenuItemEx(8,"Save as",0,0,0,0)
MenuItemEx(9,"Close",0,0,0,0)
MDIGadget(1,35,35,200,200,0,10)
AddGadgetItem(1,3,"MDI Child")
SetWindowState(3,#PB_Window_Maximize)

Repeat  
Until WaitWindowEvent() = #PB_Event_CloseWindow
So what is wrong there, well:
Image

I could add buttons whenever a MDI child is maximized, but I would like to stay as a close as possible to PB behavior; so is there any way to do it?
AndyMK
Enthusiast
Enthusiast
Posts: 582
Joined: Wed Jul 12, 2006 4:38 pm
Location: UK

Re: ProGUI V1.18! User Interface Library (New PanelEx Scroll

Post by AndyMK »

AndyMK wrote:Andy, can you post the code that you have so far and i'll take a look. I might have to do a small fix to ProGUI.

Cheers!

Chris.
Image
Image

Code: Select all

; Remember to enable XP Skin Support!
; Demonstrates how to use rebars

CompilerIf Defined(StartProGUI, #PB_Function) = #False
  IncludeFile "ProGUI_PB.pb"
CompilerEndIf
StartProGUI("", 0, 0, 0, 0, 0, 0, 0)

;- Window Constants
Enumeration
  #Window_0
EndEnumeration

;- Gadget Constants
Enumeration
  #MENU_1
  #REBAR_0
  #PopupMenu_0
  #PopupMenu_1
  #PopupMenu_2
  #PopupMenu_3
  #PopupMenu_4
  #PopupMenu_5
  #TOOLBAR_0
EndEnumeration


; set up structure for easy access to icon images
Structure images
  normal.i
  hot.i
  disabled.i
EndStructure
Global Dim image.images(36)

; load in some example icons
; a more efficient way to load your icon images is to have them
; stored in your exe's resource, in order to load them use the following line:
; image = LoadImage_(GetModuleHandle_(0), "name of icon in resource", #IMAGE_ICON, 16, 16, 0)
; doing this allows you to choose the size of icon stored in the ico file too.
image(0)\normal = LoadImage_(GetModuleHandle_(0), "icons\cut.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(0)\hot = LoadImage_(GetModuleHandle_(0), "icons\cut_h.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(0)\disabled = LoadImage_(GetModuleHandle_(0), "icons\cut_d.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)

image(1)\normal = LoadImage_(GetModuleHandle_(0), "icons\paste.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(1)\hot = LoadImage_(GetModuleHandle_(0), "icons\paste_h.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(1)\disabled = LoadImage_(GetModuleHandle_(0), "icons\paste_d.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)

image(2)\normal = LoadImage_(GetModuleHandle_(0), "icons\image.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(2)\hot = LoadImage_(GetModuleHandle_(0), "icons\image_h.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(2)\disabled = LoadImage_(GetModuleHandle_(0), "icons\image_d.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)

image(3)\normal = LoadImage_(GetModuleHandle_(0), "icons\multimedia.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(3)\hot = LoadImage_(GetModuleHandle_(0), "icons\multimedia_h.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(3)\disabled = LoadImage_(GetModuleHandle_(0), "icons\multimedia_d.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)

image(4)\normal = LoadImage_(GetModuleHandle_(0), "icons\package.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(4)\hot = LoadImage_(GetModuleHandle_(0), "icons\package_h.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(4)\disabled = LoadImage_(GetModuleHandle_(0), "icons\package_d.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)

image(5)\normal = LoadImage_(GetModuleHandle_(0), "icons\preferences.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(5)\hot = LoadImage_(GetModuleHandle_(0), "icons\preferences_h.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(5)\disabled = LoadImage_(GetModuleHandle_(0), "icons\preferences_d.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)

image(6)\normal = LoadImage_(GetModuleHandle_(0), "icons\jump.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(6)\hot = LoadImage_(GetModuleHandle_(0), "icons\jump_h.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(6)\disabled = LoadImage_(GetModuleHandle_(0), "icons\jump_d.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)

image(19)\normal = LoadImage_(GetModuleHandle_(0), "icons\copy doc.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(19)\hot = LoadImage_(GetModuleHandle_(0), "icons\copy doc_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(19)\disabled = LoadImage_(GetModuleHandle_(0), "icons\copy doc_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)

image(20)\normal = LoadImage_(GetModuleHandle_(0), "icons\computer on.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(20)\hot = LoadImage_(GetModuleHandle_(0), "icons\computer on_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(20)\disabled = LoadImage_(GetModuleHandle_(0), "icons\computer on_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)

image(21)\normal = LoadImage_(GetModuleHandle_(0), "icons\search.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(21)\hot = LoadImage_(GetModuleHandle_(0), "icons\search_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(21)\disabled = LoadImage_(GetModuleHandle_(0), "icons\search_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)


image(7)\normal = LoadImage_(GetModuleHandle_(0), "icons\advanced.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(7)\hot = LoadImage_(GetModuleHandle_(0), "icons\advanced_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(7)\disabled = LoadImage_(GetModuleHandle_(0), "icons\advanced_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)

image(8)\normal = LoadImage_(GetModuleHandle_(0), "icons\back_alt.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(8)\hot = LoadImage_(GetModuleHandle_(0), "icons\back_alt_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(8)\disabled = LoadImage_(GetModuleHandle_(0), "icons\back_alt_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)

image(9)\normal = LoadImage_(GetModuleHandle_(0), "icons\color.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(9)\hot = LoadImage_(GetModuleHandle_(0), "icons\color_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(9)\disabled = LoadImage_(GetModuleHandle_(0), "icons\color_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)

image(10)\normal = LoadImage_(GetModuleHandle_(0), "icons\computer on.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(10)\hot = LoadImage_(GetModuleHandle_(0), "icons\computer on_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(10)\disabled = LoadImage_(GetModuleHandle_(0), "icons\computer on_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)

image(11)\normal = LoadImage_(GetModuleHandle_(0), "icons\copy doc.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(11)\hot = LoadImage_(GetModuleHandle_(0), "icons\copy doc_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(11)\disabled = LoadImage_(GetModuleHandle_(0), "icons\copy doc_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)

image(12)\normal = LoadImage_(GetModuleHandle_(0), "icons\movies.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(12)\hot = LoadImage_(GetModuleHandle_(0), "icons\movies_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(12)\disabled = LoadImage_(GetModuleHandle_(0), "icons\movies_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)

image(13)\normal = LoadImage_(GetModuleHandle_(0), "icons\new archive.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(13)\hot = LoadImage_(GetModuleHandle_(0), "icons\new archive_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(13)\disabled = LoadImage_(GetModuleHandle_(0), "icons\new archive_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)

image(14)\normal = LoadImage_(GetModuleHandle_(0), "icons\pageadd.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)

image(15)\normal = LoadImage_(GetModuleHandle_(0), "icons\refresh.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(15)\hot = LoadImage_(GetModuleHandle_(0), "icons\refresh_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(15)\disabled = LoadImage_(GetModuleHandle_(0), "icons\refresh_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)

image(16)\normal = LoadImage_(GetModuleHandle_(0), "icons\search.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(16)\hot = LoadImage_(GetModuleHandle_(0), "icons\search_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(16)\disabled = LoadImage_(GetModuleHandle_(0), "icons\search_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)

image(17)\normal = LoadImage_(GetModuleHandle_(0), "icons\stop.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(17)\hot = LoadImage_(GetModuleHandle_(0), "icons\stop_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(17)\disabled = LoadImage_(GetModuleHandle_(0), "icons\stop_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)

image(18)\normal = LoadImage_(GetModuleHandle_(0), "icons\music 2.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(18)\hot = LoadImage_(GetModuleHandle_(0), "icons\music 2_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(18)\disabled = LoadImage_(GetModuleHandle_(0), "icons\music 2_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)

image(22)\normal=LoadImage_(GetModuleHandle_(0), "icons\people.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(23)\normal=LoadImage_(GetModuleHandle_(0), "icons\laptop.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(24)\normal=LoadImage_(GetModuleHandle_(0), "icons\printer.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(25)\normal=LoadImage_(GetModuleHandle_(0), "icons\other.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(26)\normal=LoadImage_(GetModuleHandle_(0), "icons\personal.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(27)\normal=LoadImage_(GetModuleHandle_(0), "icons\business.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(28)\normal=LoadImage_(GetModuleHandle_(0), "icons\open.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(29)\normal=LoadImage_(GetModuleHandle_(0), "icons\rma.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)

; creates a window
Procedure Open_Window_0()

  OpenWindow(#Window_0, 0, 0, 720, 500, "RebarExample 2", #PB_Window_ScreenCentered | #PB_Window_MinimizeGadget | #PB_Window_Invisible)

  ; this next command is important as it sets are newly created window to clipchildren
  ; which stops all the child components from being redrawn when unnessasery (reduced flickering, faster refresh)
  SetWindowLongPtr_(WindowID(#Window_0), #GWL_STYLE, GetWindowLongPtr_(WindowID(#Window_0), #GWL_STYLE)|#WS_CLIPCHILDREN)
  SetWindowColor(0,0)
  SetUIColourMode(#UICOLOURMODE_CUSTOM)

  ; create popupmenu

  CreatePopupMenuEx(#PopupMenu_3, #UISTYLE_OFFICE2007)
  MenuItemEx(7, "Business", image(27)\normal, image(27)\hot, image(27)\disabled,0)
  MenuItemEx(8, "Personal ", image(26)\normal, image(26)\hot, image(26)\disabled,0)

  SetMenuExImageSize(32,32)
  CreatePopupMenuEx(#PopupMenu_0, #UISTYLE_OFFICE2007)
  MenuItemEx(9, "PC Worksheet", image(10)\normal, image(10)\hot, image(10)\disabled,0)
  MenuItemEx(10, "Laptop Worksheet", image(23)\normal, image(23)\hot, image(23)\disabled,0)
  MenuItemEx(11, "Printer Worksheet", image(24)\normal, image(24)\hot, image(24)\disabled,0)
  MenuItemEx(12, "Other Worksheet", image(25)\normal, image(25)\hot, image(25)\disabled,0)

  CreatePopupMenuEx(#PopupMenu_2, #UISTYLE_OFFICE2007)
  MenuItemEx(13, "New Customer", image(14)\normal, image(14)\hot, image(14)\disabled,MenuExID(#PopupMenu_3))
  MenuBarEx()
  SetMenuExImageSize(16,16)
  MenuItemEx(14, "customer1", image(26)\normal, image(26)\hot, image(26)\disabled,MenuExID(#PopupMenu_4))
  MenuItemEx(15, "customer2", image(26)\normal, image(26)\hot, image(26)\disabled,MenuExID(#PopupMenu_4))

  ;create toolbar
  toolbar = CreateToolBarEx(#TOOLBAR_0, WindowID(#Window_0), 32, 32, #TBSTYLE_HIDECLIPPEDBUTTONS|#UISTYLE_OFFICE2007)

  ToolBarDropdownImageButtonEx(1, #PopupMenu_0, "  New Worksheet  ", image(14)\normal, image(14)\hot, image(14)\disabled, #BTNS_AUTOSIZE|#BTNS_WHOLEDROPDOWN)
  ;DisableToolbarExButton(#TOOLBAR_0, 1,#True)
  ToolBarDropdownImageButtonEx(2, #PopupMenu_2, "  Customers  ", image(22)\normal, image(22)\hot, image(22)\disabled, #BTNS_AUTOSIZE|#BTNS_WHOLEDROPDOWN)
  ToolBarImageButtonEx(4, "", 0, 0, 0, #BTNS_SEP)
  ToolBarImageButtonEx(3, "   RMA   ", image(29)\normal, image(29)\hot, image(29)\disabled, #BTNS_AUTOSIZE)
  ToolBarImageButtonEx(5, "Computer", image(10)\normal, image(10)\hot, image(10)\disabled, #BTNS_AUTOSIZE)
  ToolBarImageButtonEx(6, "Copy Document", image(11)\normal, image(11)\hot, image(11)\disabled, #BTNS_AUTOSIZE)
  ToolBarImageButtonEx(7, "Movies", image(12)\normal, image(12)\hot, image(12)\disabled, #BTNS_AUTOSIZE)
  ToolBarImageButtonEx(8, "Archive", image(13)\normal, image(13)\hot, image(13)\disabled, #BTNS_AUTOSIZE)
  ToolBarImageButtonEx(9, "New Document", image(14)\normal, image(14)\hot, image(14)\disabled, #BTNS_AUTOSIZE)
  ;ToolBarDropdownImageButtonEx(10, popupmenu, "Refresh", image(15)\normal, image(15)\hot, image(15)\disabled, #BTNS_AUTOSIZE|#BTNS_WHOLEDROPDOWN)
  ToolBarImageButtonEx(11, "", 0, 0, 0, #BTNS_SEP)
  ToolBarImageButtonEx(12, "Search", image(16)\normal, image(16)\hot, image(16)\disabled, #BTNS_AUTOSIZE|#BTNS_CHECK)
  ToolBarImageButtonEx(13, "Stop", image(17)\normal, image(17)\hot, image(17)\disabled, #BTNS_AUTOSIZE)
  ToolBarImageButtonEx(14, "Music", image(18)\normal, image(18)\hot, image(18)\disabled, #BTNS_AUTOSIZE)

  DisableToolbarExButton(#TOOLBAR_0, 6, 1)
  DisableToolbarExButton(#TOOLBAR_0, 7, 1)

  ; create a rebar
  CreateRebar(#REBAR_0, WindowID(#Window_0), 0, #UISTYLE_OFFICE2007|#RBS_VARHEIGHT, 0)
  AddRebarGadget(toolbar, "",650, 0, 0, 0, #RBBS_BREAK|#RBBS_CHILDEDGE|#RBBS_USECHEVRON)

  ; Rebar
  SetUIColour(#UISTYLE_OFFICE2007, #rebarBackground1, RGB(0, 0, 0), #UICOLOURMODE_CUSTOM, #False) ; gradient 1
  SetUIColour(#UISTYLE_OFFICE2007, #rebarBackground2, RGB(0, 0, 0), #UICOLOURMODE_CUSTOM, #False); gradient 2
  SetUIColour(#UISTYLE_OFFICE2007, #menuTitleHotTextColor, RGB(0, 0, 0), #UICOLOURMODE_CUSTOM, #False)
  SetUIColour(#UISTYLE_OFFICE2007, #gripperShadow, RGB(0, 0, 0), #UICOLOURMODE_CUSTOM, #False)
  ;Menu button
  SetUIColour(#UISTYLE_OFFICE2007, #menuHeldGradientColor1, RGB(0, 0, 0), #UICOLOURMODE_CUSTOM, #False) ; gradient 1
  SetUIColour(#UISTYLE_OFFICE2007, #menuHeldGradientColor2, RGB(255, 0, 0), #UICOLOURMODE_CUSTOM, #False); gradient 2
  ;SetUIColour(#UISTYLE_OFFICE2007, #background, RGB(0, 0, 0), #UICOLOURMODE_CUSTOM, #False)
  ;SetUIColour(#UISTYLE_OFFICE2007, #menuTextColor,RGB(255, 255, 255), #UICOLOURMODE_CUSTOM, #False)
  ; Toolstrip
  SetUIColour(#UISTYLE_OFFICE2007, #toolstripBackground1, RGB(100, 100, 100), #UICOLOURMODE_CUSTOM, #False) ; gradient 1
  SetUIColour(#UISTYLE_OFFICE2007, #toolstripBackground2, RGB(50, 50, 50), #UICOLOURMODE_CUSTOM, #False) ; gradient 2
  SetUIColour(#UISTYLE_OFFICE2007, #toolstripBackground3, RGB(25, 25, 25), #UICOLOURMODE_CUSTOM, #False) ; gradient 3
  SetUIColour(#UISTYLE_OFFICE2007, #toolstripBackground4, RGB(0, 0, 0), #UICOLOURMODE_CUSTOM, #False) ; gradient 4
  SetUIColour(#UISTYLE_OFFICE2007, #toolstripShadow, RGB(0, 0, 0), #UICOLOURMODE_CUSTOM, #False)
  SetUIColour(#UISTYLE_OFFICE2007, #SelectGradientColor1, RGB(0,0, 0), #UICOLOURMODE_CUSTOM, #False)
  SetUIColour(#UISTYLE_OFFICE2007, #SelectGradientColor2, RGB(255, 0, 0), #UICOLOURMODE_CUSTOM, #False)
  SetUIColour(#UISTYLE_OFFICE2007, #StickySelectGradientColor1, RGB(0, 0, 0), #UICOLOURMODE_CUSTOM, #False)
  SetUIColour(#UISTYLE_OFFICE2007, #StickySelectGradientColor2, RGB(255, 0, 0), #UICOLOURMODE_CUSTOM, #False)
  SetUIColour(#UISTYLE_OFFICE2007, #StickySelectBorderColor, RGB(0, 0, 0), #UICOLOURMODE_CUSTOM, #False)
  SetUIColour(#UISTYLE_OFFICE2007, #toolbarHotGradientColor1, RGB(0, 0, 0), #UICOLOURMODE_CUSTOM, #False)
  SetUIColour(#UISTYLE_OFFICE2007, #toolbarHotGradientColor2, RGB(255, 0, 0), #UICOLOURMODE_CUSTOM, #False)
  SetUIColour(#UISTYLE_OFFICE2007, #toolbarButtonTextColor, RGB(255, 255, 255), #UICOLOURMODE_CUSTOM, #False)
  SetUIColour(#UISTYLE_OFFICE2007, #toolbarButtonHotTextColor, RGB(255, 255, 255), #UICOLOURMODE_CUSTOM, #False)
  SetUIColour(#UISTYLE_OFFICE2007, #toolbarButtonDisabledTextColor, RGB(0, 0, 0), #UICOLOURMODE_CUSTOM, #False)
  SetUIColour(#UISTYLE_OFFICE2007, #toolbarSeparator, RGB(50, 50, 50), #UICOLOURMODE_CUSTOM, #False)
  SetUIColour(#UISTYLE_OFFICE2007, #toolbarSeparatorShadow, RGB(25, 25, 25), #UICOLOURMODE_CUSTOM, #False)
  SetUIColour(#UISTYLE_OFFICE2007, #toolbarSeparatorShadow, RGB(0, 0, 0), #UICOLOURMODE_CUSTOM, #True) ; refresh any components already created

EndProcedure


Open_Window_0() ; create window
HideWindow(0, 0)  ; show our newly created window



; enter main event loop
Repeat


  Event = WaitWindowEvent()
  window = EventWindow()

  If Event = #PB_Event_Menu
    MenuID = EventMenu()
    Debug MenuID
  EndIf


Until Event = #WM_CLOSE
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.18! User Interface Library (New PanelEx Scroll

Post by PrincieD »

Thanks Andy :) i'll take a look.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.18! User Interface Library (New PanelEx Scroll

Post by PrincieD »

Poshu: I think the best way to do it would be to place a Rebar in the MDI Window with a MenuEx in one band and a ToolbarEx in another band at the side (which will stay right aligned at the top of the window). The ToolbarEx would be created with the #UISTYLE_IMAGE flag and have 3 ToolbarImageButtonExs (using screenshots of the PB minimize/maximize/iconify icons). You could then just hide/show the rebar band with the ToolbarEx in, when the window maximizes/minimizes?

Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
AndyMK
Enthusiast
Enthusiast
Posts: 582
Joined: Wed Jul 12, 2006 4:38 pm
Location: UK

Re: ProGUI V1.18! User Interface Library (New PanelEx Scroll

Post by AndyMK »

It is possible to position a toolbar anywhere in the window?
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.18! User Interface Library (New PanelEx Scroll

Post by PrincieD »

AndyMK wrote:It is possible to position a toolbar anywhere in the window?
Yes I think if you pass the following common control style constant to the style parameter of CreateToolBarEx() the toolbar should then be positional with movewindow_():

Code: Select all

&~#CCS_TOP
Also take a look at at the other common control styles at http://msdn.microsoft.com/en-us/library ... S.85).aspx

Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
Poshu
Enthusiast
Enthusiast
Posts: 459
Joined: Tue Jan 25, 2005 7:01 pm
Location: Canada

Re: ProGUI V1.18! User Interface Library (New PanelEx Scroll

Post by Poshu »

I think the best way to do it would be to place a Rebar in the MDI Window with a MenuEx in one band and a ToolbarEx in another band at the side (which will stay right aligned at the top of the window). The ToolbarEx would be created with the #UISTYLE_IMAGE flag and have 3 ToolbarImageButtonExs (using screenshots of the PB minimize/maximize/iconify icons). You could then just hide/show the rebar band with the ToolbarEx in, when the window maximizes/minimizes?
Yeah, I thought about that but I was wondering if it was possible otherwise. No problem anyway.

Still, I don't understand something (not proGUI related) in some of your exemples:

Code: Select all

; a more efficient way to load your icon images is to have them
; stored in your exe's resource, in order to load them use the following line:
; image = LoadImage_(GetModuleHandle_(0), "name of icon in resource", #IMAGE_ICON, 16, 16, 0)
Yeah... Obviously... Well... Could you show me an exemple there? I really don't get it.
PrincieD
Addict
Addict
Posts: 858
Joined: Wed Aug 10, 2005 2:08 pm
Location: Yorkshire, England
Contact:

Re: ProGUI V1.18! User Interface Library (New PanelEx Scroll

Post by PrincieD »

Poshu wrote: Still, I don't understand something (not proGUI related) in some of your exemples:

Code: Select all

; a more efficient way to load your icon images is to have them
; stored in your exe's resource, in order to load them use the following line:
; image = LoadImage_(GetModuleHandle_(0), "name of icon in resource", #IMAGE_ICON, 16, 16, 0)
Yeah... Obviously... Well... Could you show me an exemple there? I really don't get it.
If you go onto the compiler settings in PureBasic for your project and click on the resources tab you can add files to your compiled exe. In our case the file could be an icon with lots of different dimensioned versions of itself inside the .ico file (including a 16x16 pixel version). The above line would then load the requested file in the correct dimension (16, 16) from the .ico file stored in the compiled exe (it's resource). The benefits are all the files needed for the app are included into the exe.

Hope that makes it a bit clearer!

Chris.
ProGUI - Professional Graphical User Interface Library - http://www.progui.co.uk
Locked