ToolBars [WB3D]
Blitz3D Forums/Blitz3D Programming/ToolBars [WB3D]
| ||
whats wrong with the following code:Include "WB3DStyles.bb" Global RuntimeWindow_hWnd = WB3D_InitializeGUI(SystemProperty("AppHwnd"),WB3D_GadgetWidth(WB3D_DeskTop())/2-402/2,WB3D_GadgetHeight(WB3D_DeskTop())/2-302/2,402,302) WB3D_HideGadget RuntimeWindow_hWnd m_window = WB3D_CreateWindow("test",WB3D_GadgetWidth(WB3D_DeskTop())/2-800/2,WB3D_GadgetHeight(WB3D_DeskTop())/2-600/2,800,600,0,0) WB3D_SetGadgetStyle m_window,WS_VISIBLE Or WS_CAPTION Or WS_SYSMENU Or WS_MINIMIZEBOX m_tb = WB3D_CreateToolBar(0,0,700,20,m_window,0) WB3D_AddToolBarButton(m_tb,1,0,"","Hey",0) ;WB3D_CreateTreeView( WB3D_UpdateToolbar(m_tb) WB3D_FlushEvents QUIT = 0 While Not QUIT = 1 Cls event = WB3D_WaitEvent() Select event Case WB3D_EVENT_WINDOW_CLOSE source = WB3D_EventSource() Select source Case m_window QUIT = 1 End Select End Select Delay 5 Flip Wend WB3D_EndGUI() End ? i'm trying to get the standard copy button... not sure how these work yet. |
| ||
Hi Yahfree, WB3D_ToolBarDefaultBmp() is what you need to use windows default icons.toolbar2 = WB3D_CreateToolBar(0,0,100,20,window,0) WB3D_ToolBarDefaultBmp toolbar2 WB3D_AddToolBarButton toolbar2,STD_CUT,2000,"Cut","cut",0 WB3D_AddToolBarButton toolbar2,STD_COPY,2001,"Copy","copy",0 WB3D_AddToolBarButton toolbar2,STD_PASTE,2003,"Paste","paste",0 WB3D_UpdateToolbar toolbar2 STD_??? consts are found in WB3DStyles.bb kev |
| ||
This seems to work, thanks |
| ||
no problem Yahfree. you now have STD :P |
| ||
Hey kev, can you remove the tray thing down there? it seems when i create a new sub window, IE, open mircophone setting VIA pushing a toolbar button, (create a new window) it creates a new tray item. Aswell, i'd rather not have that, is this possibe? heres how i'm creating the window: Case m_tb button = WB3D_EventData() Select button Case 1 If NewAssignment = 0 NewAssignment = WB3D_CreateWindow("New Assignment",0,0,200,200,0,0) Else WB3D_SetTopMost(NewAssignment) WB3D_SetActiveWindow(NewAssignment) End If End Select |
| ||
Hi Yahfree first when creating NewAssignment window set the parent to the window that is active before its created/opened. then using WB3D_SetParent() change the parent to 0 heres an example to make it a little clear ; ; ; ; Include "WB3DStyles.bb" ; Graphics3D 640,480,16,3 SetBuffer BackBuffer() camera = CreateCamera() PositionEntity camera,0,0,0 light = CreateLight() cube = CreateCube() PositionEntity cube,-1.5,2.7,7 ; RuntimeWindow_hWnd = WB3D_InitializeGUI(SystemProperty("AppHwnd"),10,10,500,500) WB3D_SetGadgetText RuntimeWindow_hWnd,"Blitz3D Runtime Window" window = WB3D_CreateWindow("Test Window",100,250,300,200,RuntimeWindow_hWnd,0) WB3D_SetParent window,0 Global QUIT = 0 While QUIT = 0 TurnEntity cube,1,1,1 UpdateWorld RenderWorld Flip event = WB3D_WaitEvent() Select event Case WB3D_EVENT_WINDOW_CLOSE Select WB3D_EventSource() Case RuntimeWindow_hWnd QUIT = 1 End Select End Select Wend WB3D_EndGUI() EndGraphics End kev |
| ||
Perfect... :D |
| ||
how do i get the whole contents of a text area: like say (made up code) type textareaholder field lines$ end type for i=0 to Wb3d_somemagiclinenumberfunction(my_text) newl.textareaholder = New textareaholder newl\lines = magicfunctionreturnsbasedonlines(my_text,i) next ? somthing like this but what are the magic functions? do they exist? |
| ||
WB3D_TextAreaText() will return the entire contents of the textarea. kev |
| ||
How? into one string? i want to be able to seperate the line differences IE text Hello my name is yahfree would turn out as hellomynameisyahfree is there a way to preserve the lines? |