[BUG] Do Dialog containers have a 16 columns limit?

Just starting out? Need help? Post your questions and find answers here.
User avatar
Caronte3D
Addict
Addict
Posts: 1055
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

[BUG] Do Dialog containers have a 16 columns limit?

Post by Caronte3D »

Hi
When my container is greater than 16 columns, it no more reach the right side even if ColExpand is on :?
Is it a bug?
Any workaround?

Thanks!
Last edited by Caronte3D on Fri Jan 17, 2020 5:57 pm, edited 1 time in total.
User avatar
Kiffi
Addict
Addict
Posts: 1357
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Re: Do Dialog containers have a 16 columns limit?

Post by Kiffi »

Caronte3D wrote:Is it a bug?
Any workaround?
Any sample code?
Hygge
User avatar
Caronte3D
Addict
Addict
Posts: 1055
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: Do Dialog containers have a 16 columns limit?

Post by Caronte3D »

Thi's the xml:

Code: Select all

<dialogs>
  <window flags="#PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_SizeGadget | #PB_Window_ScreenCentered" width="800" minwidth="800" minheight="290" height="220" text="Inicializando..." name="window_1">
    <vbox spacing="1" align="" expand="no">
      <gridbox colexpand="equal" rowexpand="no" columns="16" rowspacing="1" name="gridbox1">
        <text text="1" flags="#PB_Text_Center | #PB_Text_Border" colspan="2" name="dfdfn"/>
        <text text="2" flags="#PB_Text_Center | #PB_Text_Border" colspan="2" name="dfcv"/>
        <text text="3" flags="#PB_Text_Center | #PB_Text_Border" colspan="2" name="vfdv"/>
        <text text="4" flags="#PB_Text_Center | #PB_Text_Border" colspan="2" name="btbb"/>
        <text text="5" flags="#PB_Text_Center | #PB_Text_Border" colspan="2" name="hxff"/>
        <text text="6" flags="#PB_Text_Center | #PB_Text_Border" colspan="2" name="sdrr"/>
        <text text="7" flags="#PB_Text_Center | #PB_Text_Border" colspan="2" name="fffhdf"/>
        <text text="8" flags="#PB_Text_Center | #PB_Text_Border" colspan="2" name="drth"/>
      </gridbox>
      <gridbox colexpand="equal" rowexpand="no" columns="32" name="gridbox2">
        <text flags="#PB_Text_Center | #PB_Text_Border" colspan="4" height="30" rowspan="1" text="1" name="dhhhh"/>
        <text flags="#PB_Text_Center | #PB_Text_Border" text="2" colspan="4" height="30" name="eyth"/>
        <text text="3" flags="#PB_Text_Center | #PB_Text_Border" colspan="4" height="30" name="etjfg"/>
        <text text="4" flags="#PB_Text_Center | #PB_Text_Border" colspan="4" height="30" name="etjetj"/>
        <text text="5" flags="#PB_Text_Center | #PB_Text_Border" colspan="4" height="30" name="tjet"/>
        <text text="6" flags="#PB_Text_Center | #PB_Text_Border" colspan="4" height="30" name="etjet"/>
        <text text="7" flags="#PB_Text_Center | #PB_Text_Border" colspan="4" height="30" name="jej"/>
        <text text="8" flags="#PB_Text_Center | #PB_Text_Border" colspan="4" height="30" name="asf"/>
      </gridbox>
    </vbox>
  </window>
</dialogs>
and.. thi's the result:
Image
User avatar
Kiffi
Addict
Addict
Posts: 1357
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Re: Do Dialog containers have a 16 columns limit?

Post by Kiffi »

This seems to be a bug (at least in terms of documentation):
*****************************************************************
gridbox
*****************************************************************

Align elements in a table. Can contain any number of children.

Code: Select all

EnableExplicit

Define XML$

#Dialog = 0
#Xml = 0


XML$ = "<dialogs>" + 
       "  <window flags='#PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_ScreenCentered' text='GridBox-Test' name='window_1'>" + 
       "    <vbox>"

Define Columns, Column

For Columns = 1 To 20
  
  XML$ + " <gridbox columns='" + Columns + "'>"
  
  For Column = 1 To Columns
    XML$ + "<text text='" + Column + "' flags='#PB_Text_Border' />"
  Next
  
  XML$ + "</gridbox> " 
  
Next

XML$ + "    </vbox>" + 
       "  </window>" + 
       "</dialogs>"

If ParseXML(#Xml, XML$) And XMLStatus(#Xml) = #PB_XML_Success
  
  If CreateDialog(#Dialog) And OpenXMLDialog(#Dialog, #Xml, "window_1")
    Repeat
    Until WaitWindowEvent() = #PB_Event_CloseWindow 
  Else  
    Debug "Dialog error: " + DialogError(#Dialog)
  EndIf
  
Else
  Debug "XML error: " + XMLError(#Xml) + " (Line: " + XMLErrorLine(#Xml) + ")"
EndIf
Image

Greetings ... Peter
Hygge
User avatar
Caronte3D
Addict
Addict
Posts: 1055
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: [BUG] Do Dialog containers have a 16 columns limit?

Post by Caronte3D »

Thank you to take the time to confirm it :wink:
wombats
Enthusiast
Enthusiast
Posts: 664
Joined: Thu Dec 29, 2011 5:03 pm

Re: [BUG] Do Dialog containers have a 16 columns limit?

Post by wombats »

It seems to be a hardcoded limit. Line 33: https://github.com/fantaisie-software/p ... Gridbox.pb
PureLust
Enthusiast
Enthusiast
Posts: 477
Joined: Mon Apr 16, 2007 3:57 am
Location: Germany, NRW

Re: [BUG] Do Dialog containers have a 16 columns limit?

Post by PureLust »

Japp .... it's a known issue since 2016.

I wonder, why it has never been 'fixed' or extended, if there is just one line of code needed to be changed. :(


But at least the mentioned column flickering seems to be fixed in 5.71 LTS (at least on my new machine it does not flicker anymore, but even [my old Demo] does not flicker on this new machine, so ... :?: ).
[Dynamic-Dialogs] - create complex GUIs the easy way
[DeFlicker] - easily deflicker your resizeable Windows
[WinFX] - Window Effects (incl. 'click-through' Window)
User avatar
Caronte3D
Addict
Addict
Posts: 1055
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: [BUG] Do Dialog containers have a 16 columns limit?

Post by Caronte3D »

PureLust wrote:Japp .... it's a known issue since 2016.

I wonder, why...
Too sad :( I hope we have a better bug resolution now that the interface is OpenSource (from community at least)

I have recently purchased PB and I'm very happy with him, but things like that become a problem when you have to accomplish deadlines
wombats
Enthusiast
Enthusiast
Posts: 664
Joined: Thu Dec 29, 2011 5:03 pm

Re: [BUG] Do Dialog containers have a 16 columns limit?

Post by wombats »

What do you need so many columns for?

You could have several gridbox elements side-by-side.
User avatar
Caronte3D
Addict
Addict
Posts: 1055
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: [BUG] Do Dialog containers have a 16 columns limit?

Post by Caronte3D »

wombats wrote:...You could have several gridbox elements side-by-side.
Yes, that's the way how I have avoided the problem by now :wink:
PureLust
Enthusiast
Enthusiast
Posts: 477
Joined: Mon Apr 16, 2007 3:57 am
Location: Germany, NRW

Re: [BUG] Do Dialog containers have a 16 columns limit?

Post by PureLust »

wombats wrote:What do you need so many columns for?
...You could have several gridbox elements side-by-side.
As you can see in my old Prototype for a DialogDesigner, I have 25 Icons in a row which should be autoarranged by the GridBox (just rezise the window a few times to see the Problem).
If you split these Icons into several GridBoxes, the result will not be the same.
[Dynamic-Dialogs] - create complex GUIs the easy way
[DeFlicker] - easily deflicker your resizeable Windows
[WinFX] - Window Effects (incl. 'click-through' Window)
Post Reply