It is currently Sat Dec 14, 2019 6:32 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: SpinGadget in Dialog has no natural size
PostPosted: Sun Feb 10, 2019 9:45 am 
Offline
Enthusiast
Enthusiast

Joined: Mon Jun 23, 2014 1:18 pm
Posts: 165
If I create a DateGadget in a Dialog, die Gadget use its natural size.
Code:
<date text="%dd.%mm.%yyyy" name="datVon" onchange="evtAufgabeChange()" flags="#PB_Date_CheckBox"/>


The SpinGadget don't use its natural size. Its always small.
Code:
<spin name="spnProzent" min="0" max="100" value="0" text="0" onchange="evtAufgabeChange()" flags="#PB_Spin_Numeric"/>   


I don't like to give width in Dialogs, cause of naturalsize feature. :)


Top
 Profile  
Reply with quote  
 Post subject: Re: SpinGadget in Dialog has no natural size
PostPosted: Wed Apr 10, 2019 8:03 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 13662
Location: France
Could you post a small snippet showing the issue ?


Top
 Profile  
Reply with quote  
 Post subject: Re: SpinGadget in Dialog has no natural size
PostPosted: Thu Apr 11, 2019 5:11 am 
Offline
Enthusiast
Enthusiast

Joined: Mon Jun 23, 2014 1:18 pm
Posts: 165
Sure :D

Code:
EnableExplicit

Define xml.s
xml+~"<dialogs>"
xml+~"<window text=\"Test\" name=\"main\" flags=\"#PB_Window_SystemMenu|#PB_Window_ScreenCentered\">"
xml+~"<vbox>"
xml+~"<hbox expand=\"no\">"
xml+~"<date text=\"%dd.%mm.%yyyy\" flags=\"#PB_Date_UpDown\"/>"
xml+~"</hbox>"
xml+~"<hbox expand=\"no\">"
xml+~"<spin min=\"0\" max=\"100\" text=\"10\" value=\"10\" flags=\"#PB_Spin_Numeric\"/>"
xml+~"</hbox>"
xml+~"<hbox expand=\"no\">"
xml+~"<spin min=\"0\" max=\"1000\" text=\"999\" value=\"999\" flags=\"#PB_Spin_Numeric\"/>"
xml+~"</hbox>"
xml+~"</vbox>"
xml+~"</window>"
xml+~"</dialogs>"


Define fxml=ParseXML(#PB_Any,xml)
Define dialog=CreateDialog(#PB_Any)
If OpenXMLDialog(dialog,fxml,"main")
   Repeat:Until WaitWindowEvent()=#PB_Event_CloseWindow
EndIf


Image

You see… It doesn't matter. The DateGadget get a natural size. The SpinGadget doesn't.


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

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