It is currently Sat Jul 20, 2019 12:39 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Dialog gridbox spacing
PostPosted: Thu May 09, 2019 11:33 am 
Offline
Enthusiast
Enthusiast

Joined: Thu Dec 29, 2011 5:03 pm
Posts: 434
Hi,

On macOS, the ImageGadget is bigger than desired.

Image

Code:
Runtime Enumeration
  #Dialog
  #XML
  #Image
EndEnumeration

Procedure.s GetDialogXML()
  Protected xml$
  xml$ + "<window id='#Dialog' name='Test' text='' minwidth='350' minheight='auto' flags='#PB_Window_ScreenCentered | #PB_Window_SystemMenu | #PB_Window_WindowCentered | #PB_Window_SizeGadget'>"
  xml$ + "  <vbox expand='item:1'>"
  xml$ + "    <gridbox columns='3' colexpand='item:2' rowexpand='equal'>"
  xml$ + "      <text text='One:'/>"
  xml$ + "      <string height='22' text='...'/>"
  xml$ + "      <image name='img' width='16' height='16' maxwidth='16' maxheight='16'/>"
  xml$ + "    </gridbox>"
  xml$ + "  </vbox>"
  xml$ + "</window>"
  ProcedureReturn xml$
EndProcedure

If ParseXML(#XML, GetDialogXML()) And XMLStatus(#Xml) = #PB_XML_Success
  If CreateDialog(#Dialog) And OpenXMLDialog(#Dialog, #XML, "Test")
    CreateImage(#Image, 16, 16, 32, RGB(0, 0, 255))
    SetGadgetState(DialogGadget(#Dialog, "img"), ImageID(#Image))
    Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
  EndIf
EndIf


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 1 guest


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