It is currently Sun Oct 25, 2020 2:52 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: [Done] A bug in the dialog lib ?
PostPosted: Wed Feb 19, 2020 11:55 am 
Offline
Enthusiast
Enthusiast

Joined: Fri Feb 24, 2012 10:19 am
Posts: 196
I can't see any differences between top/left and botton/right, after resizing, is that a bug ?

Code:
#Dialog = 0
#Xml = 0

XML$ = "<window id='#PB_Any' name='test' text='test' minwidth='auto' minheight='auto' flags='#PB_Window_ScreenCentered | #PB_Window_SystemMenu | #PB_Window_SizeGadget'>" +
       "<vbox>" +
       "<hbox align='top/left' expand='no'>"+
       "<button name='button_1'/>" +
       "<button name='button_2'/>" +
       "<button name='button_3'/>" +
       "</hbox>"+
       "<hbox align='bottom/right' expand='no'>"+
       "<button name='button_4'/>" +
       "<button name='button_5'/>" +
       "<button name='button_6'/>" +
       "</hbox>"+
       "</vbox>"+
       "</window>"

If ParseXML(#Xml, XML$) And XMLStatus(#Xml) = #PB_XML_Success
 
  If CreateDialog(#Dialog) And OpenXMLDialog(#Dialog, #Xml, "test")
   
    Repeat
      Event = WaitWindowEvent()
    Until Event = #PB_Event_CloseWindow
   
  Else 
    Debug "Erreur de la bibliothèque -Dialog- : " + DialogError(#Dialog)
  EndIf
Else
  Debug "Erreur XML : " + XMLError(#Xml) + " (Ligne: " + XMLErrorLine(#Xml) + ")"
EndIf


M.


Top
 Profile  
Reply with quote  
 Post subject: Re: A bug in the dialog lib ?
PostPosted: Thu Feb 20, 2020 11:37 pm 
Offline
New User
New User

Joined: Thu Feb 13, 2020 8:24 am
Posts: 3
The control works if you use just top, bottom, left, center or right and not as top/left this is probably just been set to shorten the instruction set but it is very confusing top= top/left bottom = bottom/right
Code:
#Dialog = 0
#Xml = 0

XML$ = "<window id='#PB_Any' name='test' text='test' minwidth='auto' minheight='auto' flags='#PB_Window_ScreenCentered | #PB_Window_SystemMenu | #PB_Window_SizeGadget'>" +
       "<vbox >" +
       "<hbox align='top' expand='no'>"+
       "<button name='button_10'/>" +
       "<button name='button_11'/>" +
       "<button name='button_12'/>" +
       "</hbox>"+
       "<hbox align='right' expand='no'>"+
       "<button name='button_1'/>" +
       "<button name='button_2'/>" +
       "<button name='button_3'/>" +
       "</hbox>"+
       "<hbox align='center' expand='no'>"+
       "<button name='button_4'/>" +
       "<button name='button_5'/>" +
       "<button name='button_6'/>" +
       "</hbox>"+
       "<hbox align='left' expand='no'>"+
       "<button name='button_7'/>" +
       "<button name='button_8'/>" +
       "<button name='button_9'/>" +
       "</hbox>"+
       "<hbox align='bottom' expand='no'>"+
       "<button name='button_13'/>" +
       "<button name='button_14'/>" +
       "<button name='button_15'/>" +
       "</hbox>"+
       "</vbox>"+
       "</window>"

If ParseXML(#Xml, XML$) And XMLStatus(#Xml) = #PB_XML_Success
 
  If CreateDialog(#Dialog) And OpenXMLDialog(#Dialog, #Xml, "test")
   
    Repeat
      Event = WaitWindowEvent()
    Until Event = #PB_Event_CloseWindow
   
  Else
    Debug "Erreur de la bibliothèque -Dialog- : " + DialogError(#Dialog)
  EndIf
Else
  Debug "Erreur XML : " + XMLError(#Xml) + " (Ligne: " + XMLErrorLine(#Xml) + ")"
EndIf


Top
 Profile  
Reply with quote  
 Post subject: Re: A bug in the dialog lib ?
PostPosted: Mon Feb 24, 2020 10:35 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 14116
Location: France
It's a doc thing, it was meant to be either top or left, or bottom or right for the same effect


Top
 Profile  
Reply with quote  
 Post subject: Re: A bug in the dialog lib ?
PostPosted: Mon Feb 24, 2020 10:57 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 6:14 pm
Posts: 1859
Location: Germany (Saxony, Deutscheinsiedel)
Fred wrote:
It's a doc thing, it was meant to be either top or left, or bottom or right for the same effect

But aligning the content of a "box" for both vertical and horizontal direction would be a feature-request then... ;-)

Or is it thought, that a 'vbox' can only be aligned 'top', 'bottom' or 'center', and a 'hbox' must be aligned 'left', 'right' or 'center'? And the user must use a combination of hbox + vbox then, to get correct alignment in both directions?

_________________
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)


Top
 Profile  
Reply with quote  
 Post subject: Re: A bug in the dialog lib ?
PostPosted: Tue Feb 25, 2020 9:48 am 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 14116
Location: France
Yes, that's it. It would be best to describe it like this in the doc.


Top
 Profile  
Reply with quote  
 Post subject: Re: A bug in the dialog lib ?
PostPosted: Tue Mar 03, 2020 11:44 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 6:14 pm
Posts: 1859
Location: Germany (Saxony, Deutscheinsiedel)
Fred wrote:
Yes, that's it. It would be best to describe it like this in the doc.

Docs updated.

_________________
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)


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

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