It is currently Wed Oct 28, 2020 6:46 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: [Done]Requester Example: Window height is "0"
PostPosted: Sun Jul 26, 2020 10:34 am 
Offline
New User
New User
User avatar

Joined: Sat Jun 03, 2017 10:26 am
Posts: 8
As the title says the window height in the requester example is set to 0 and cuts off the bottom part of the menu, small thing I know but I'm here so I thought I'd mention it.

Code:
;
; ------------------------------------------------------------
;
;   PureBasic - Requester example file
;
;    (c) Fantaisie Software
;
; ------------------------------------------------------------
;

If OpenWindow(0, 100, 200, 300, 0, "PureBasic - Requesters example")

  If CreateMenu(0, WindowID(0))
    MenuTitle("Test")
      MenuItem(0, "Open")
      MenuItem(1, "Save")
      MenuItem(6, "Path")
      MenuBar()
      MenuItem(2, "Choose a color")
      MenuItem(3, "Choose a font")
      MenuBar()
      MenuItem(4, "Simple message")
      MenuBar()
      MenuItem(5, "Quit")
  EndIf
 
  Repeat
    Event = WaitWindowEvent()

    Select Event
   
      Case #PB_Event_Menu  ; A Menu item has been selected
     
        Select EventMenu()
       
          Case 0  ; OpenFileRequester
            File$ = OpenFileRequester("PureBasic - Open", "Pure.txt", "Text (*.txt)|*.txt;*.bat|(PureBasic (*.pb)|*.pb", 0)
            If File$+File$
              MessageRequester("Information", "Selected File: "+File$, 0);
            EndIf
         
          Case 1  ; SaveFileRequester
            File$ = SaveFileRequester("PureBasic - Save", "Basic.pb", "Text (*.txt)|*.txt|(PureBasic (*.pb)|*.pb", 1)
            If File$
              MessageRequester("Information", "Selected File: "+File$, 0);
            EndIf
         
          Case 2  ; ColorRequester
            Colour = ColorRequester()
            If Colour > -1
              MessageRequester("Info", "Colour choosen: Red: "+Str(Red(Colour))+", Green: "+Str(Green(Colour))+", Blue: "+Str(Blue(Colour)), 0);
            EndIf
         
          Case 3  ; FontRequester
            If FontRequester("Courier", -13, 0)
              MessageRequester("Info", "Selected font: "+SelectedFontName()+Chr(10)+"Font size: "+Str(SelectedFontSize()), 0)
            EndIf
         
          Case 4  ; MessageRequester
            MessageRequester("Information", "Simple Message"+Chr(13)+"Line 2"+Chr(13)+"Line 3", 0)
         
          Case 5  ; Quit
            Quit = 1
           
          Case 6
            Path$ = PathRequester("Choose a path...","C:\")
            If Path$
              MessageRequester("Information", "Selected Path: "+Path$, 0)
            EndIf
           
        EndSelect
     
     
      Case #PB_Event_CloseWindow  ; If the user has pressed on the close button
        Quit = 1
       
    EndSelect

  Until Quit = 1
 
EndIf

End   ; All the opened windows are closed automatically by PureBasic
   


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye