-----------------Original post ------------------------------
Greets!
BlueGUI 2.05, DBPro upgraded to 1.058, XP Home, poor graphics card (GeForge MX 420, 64mb), 1gig ram, 2.8gig P4 ...
Looked thru FAQs and searched but didn't find this topic. Found related but didn't help.
I'm trying to write a simple windows application and with the code attached I get the window shown in the .rtf file. I have DBPro setup to match my 19" monitor res of 1280x960 ... I'm I missing something here??
Also why is there no call in the output from Rainbow source code for the window details (i.e. no calls to specify window size, style, etc) that one can go back in and tweek instead of having to change size in Rainbow.
Cheers in advance!
----------------- end of original post -------------------------
Sorry here is the screen capture in a more reasonable file/size format.
Basically the area that isn't blackened is the window gadgets I want and the size of window I want (i.e. the window size I chose in Rainbow was 1000x600, simple panel, simple menu, simple quit button).
Sorry for the horrendous download!
Hope my code snippet will appear this time ...
startBlue "",""
`Global Variable Declarations for Gadgets
`----------------------------------------
global pnlMain
global pnlDisplay
global btnExit
`Menu Gloals
`-----------
global menu
global menuFile
global menuEdit
global menuHelp
#constant MENU_FILE 0
#constant MENU_EDIT 1
#constant MENU_HELP 2
createUI()
createMainMenu()
`Create instruction label
rem lbInstruction=createLabel(0,0,640,200,"Click a button to create a new object",0)
do
getEvent
if eventSource()=btnExit and eventType()=MOUSE_CLICK
break
return
endif
if eventType()=MENU_CLICK
select eventData()
case 6 `Quit
end
endcase
case 5 `Close
message "You selected Close from File"
endcase
case 4 `Save as ...
message "You selected Save as ... from File"
endcase
case 3 `Save
message "You selected Save from File"
endcase
case 2 `Open
message "You selected Open from File"
endcase
case 1 `New
message "You selected New from File"
endcase
endselect
endif
if eventType()=WINDOW_CLOSE
if eventSource()=normalWindow
if questionMessage("Do you wish to exit?","Exit?")=1
end
endif
else
warningMessage "Click the X button on the main window to exit the program."
endif
endif
loop
`Create User Interface
`---------------------
function createUI()
If Not GUI_CONSTANTS Then errorMessage "GUI Constants not defined. Please include gui.dba when you compile" : end
pnlMain=createPanel(3,6,992,589,0)
pnlDisplay=createPanel(432,74,538,489,pnlMain)
setPanelBorderStyle pnlDisplay,2
rem btnExit=createButton(22,529,75,25,"Quit",0,pnlMain)
rem toolbar=createToolbar(0)
rem addStandardButtons toolbar
rem addButton toolbar,TOOLBAR_OPEN,0
endfunction
`Create Main Menu
`----------------
function createMainMenu()
menu=createMenu(0)
addMenuItem menu,"File",0
addMenuItem menu,"Edit",1
addMenuItem menu,"Help",2
menuFile=createSubMenu(menu,0)
addMenuItem menuFile,"New",1
addMenuItem menuFile,"Open",2
addMenuSplitter menuFile
addMenuItem menuFile,"Save",3
addMenuItem menuFile,"Save as ...",4
addMenuItem menuFile,"Close",5
addMenuSplitter menuFile
addMenuItem menuFile,"Quit",6
rem menuEdit=createSubMenu(menu,2) this creates an arrow for further menu submenus!!!!
rem menuHelp=createSubMenu(menu,3)
endfunction