It is currently Sun Mar 29, 2020 12:25 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 10 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: 180
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: 14009
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: 180
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  
 Post subject: Re: SpinGadget in Dialog has no natural size
PostPosted: Tue Feb 04, 2020 9:51 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 14009
Location: France
The spin looks OK to me, as it's enough to fit one digit. If you need it bigger you need to set a min size


Top
 Profile  
Reply with quote  
 Post subject: Re: SpinGadget in Dialog has no natural size
PostPosted: Wed Feb 05, 2020 9:42 am 
Offline
Enthusiast
Enthusiast

Joined: Mon Jun 23, 2014 1:18 pm
Posts: 180
Maybe it's a DPI problem?


Top
 Profile  
Reply with quote  
 Post subject: Re: SpinGadget in Dialog has no natural size
PostPosted: Wed Feb 05, 2020 10:34 am 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 14009
Location: France
Which size do you expect ? I don't really understand


Top
 Profile  
Reply with quote  
 Post subject: Re: SpinGadget in Dialog has no natural size
PostPosted: Wed Feb 05, 2020 11:27 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jun 11, 2006 12:07 am
Posts: 551
Location: Near Hamburg | Status: Currently not active in programming.
I also cannot reproduce the problem.
Thats the window compiled with 5.71 x86, activated DPI aware compiler option running on an Windows 7 System:

Image

Same for compiling without DPIA.

Maybe it's an Windows 10 issue?

Kurzer

PS: The same is valid for version 5.72 b1.
But what I notice is that the size of the window and the gadgets does not change at all when I activate DPIA and run the EXE later on a Windows system with 125% desktop scaling.

The program window and the gadgets are always the same size in all cases and on both computers (100% & 125%).

_________________
PB 5.71 x64, OS: Windows 7 Pro x64, Desktopscaling: 125%, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520, User age: 51y
"Happiness is a pet." | "Never run a changing system!"


Top
 Profile  
Reply with quote  
 Post subject: Re: SpinGadget in Dialog has no natural size
PostPosted: Wed Feb 05, 2020 11:41 am 
Offline
Enthusiast
Enthusiast

Joined: Tue Jul 26, 2005 12:02 pm
Posts: 214
Location: Lieusaint (77), France
Under Windows 10 :

Image

I don't see any visual problem.

_________________
Purebasic 5.71 64 bits - Windows 10 Pro 64 bits 1909


Top
 Profile  
Reply with quote  
 Post subject: Re: SpinGadget in Dialog has no natural size
PostPosted: Wed Feb 05, 2020 8:54 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon Jun 23, 2014 1:18 pm
Posts: 180
This is funny... I use Windows 10 (Build 1909) and now my code looks like this:
Image

It looks like, something changed in Windows.
But than I tried the same code in Version 5.72 Beta 1.
Image

It doesn't matter if I check or uncheck the dpi in the settings.

My actual Display:
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: SpinGadget in Dialog has no natural size
PostPosted: Wed Feb 05, 2020 9:26 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 14009
Location: France
I see, so you expect the spingadget to display at least 3 digits beacsue you put it as text/value in the XML. Fair enough, I wil see what can be done.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 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