<div dir="ltr"><div style="font-family:arial,sans-serif;font-size:13px">Hi All!</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">For future reference, the problem was that <b>GtkComboBox</b> is converted to a <b>ListBox</b> and not to a <b>ComboBox</b> when <b>"Has Entry"</b> is turned off in the .ui file.</div>
<div style="font-family:arial,sans-serif;font-size:13px"><div><br></div><div>All the best,</div><div>Krisztian</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 18 July 2014 16:17, Krisztian Pinter <span dir="ltr"><<a href="mailto:pin.terminator@gmail.com" target="_blank">pin.terminator@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi All!</div><div><br></div>I have realized that one problem is that in the old style I was calling the ctor of the <b>ComboBox</b> directly, and was able to set <b>WinBits</b> flags:<div>
<div><b>aPaletteComboBox( this, WinBits( WB_BORDER | WB_DROPDOWN | WB_AUTOSIZE) ),</b></div>
</div><div><br></div><div>However, now I use <b>VclBuilder::get</b>, and I can't do this. I tried setting the flags after construction</div>
<div><b>mpPaletteComboBox->SetStyle( WinBits(WB_BORDER | WB_DROPDOWN | WB_AUTOSIZE) );</b><br></div><div>but I think these flags affect the object construction itself, so by that point, it's too late.</div><div><br>

</div><div><b>WB_DROPDOWN</b> is key here, because if it's not set, <b>mpFloatWin</b> won't be initialized.<br></div><div><br></div><div>I tried looking in Glade, to see if I can set these flags there, but I couldn't find anything.<br>


<div><br></div><div>All the best,</div><div>Krisztian</div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On 18 July 2014 14:37, Krisztian Pinter <span dir="ltr"><<a href="mailto:pin.terminator@gmail.com" target="_blank">pin.terminator@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><span style="font-family:arial,sans-serif;font-size:13px">Hi All!</span><br></div><div><div style="font-family:arial,sans-serif;font-size:13px">

<br></div><div><span style="font-family:arial;font-size:small">I'm working on converting the palette popup window (</span><b>SvxColorWindow_Impl</b>, looks like this in my branch right now: <a href="http://i.imgur.com/4XAbRaH.png" target="_blank">http://i.imgur.com/4XAbRaH.png</a><span style="font-family:arial;font-size:small">) to use the widget layout, and I kind of got it working. It places the widgets based on a .ui file, but a <b>ComboBox</b> makes LO crash at the slightest provocation.</span></div>





<div><br></div><div><div style="font-size:13px;font-family:arial,sans-serif"><span style="font-family:arial;font-size:small">To make <b>SvxColorWindow_Impl</b> use the widget layout, I did some research, and I drew this inheritance diagram: </span><a href="http://i.imgur.com/KK2GegK.jpg" style="font-family:arial;font-size:small" target="_blank">http://i.imgur.com/KK2GegK.jpg</a></div>




<div style="font-size:13px;font-family:arial,sans-serif">I made <b>FloatingWindow</b> also inherit from <b>VclBuilderContainer</b>, like <b>Dialog</b>, and added new ctors to <b>FloatingWindow</b> and <b>SfxPopupWindow</b>, that take two extra string parameters for the .ui file location and the id of the root widget.</div>




<div style="font-size:13px;font-family:arial,sans-serif"><span style="font-family:arial;font-size:small">I hardcoded the .ui path for <b>SvxColorWindow_Impl</b> in its ctor, since it's supposed to be a leaf in the inheritance tree.</span><br>




</div><div>I also copypasted <b>GetOptimalSize</b>, <b>SetPosSizePixel</b>, <b>SetSizePixel</b> and <b>SetPosPixel</b> from <b>TabPage</b> to <b>FloatingWindow</b>.</div></div><div>This made the popup window show up, if I disabled parts of the code that called methods on the <b>ComboBox</b>.<br>



</div><div><span style="font-family:arial;font-size:small"><br>
</span></div><div><span style="font-family:arial;font-size:small">The <b>ComboBox</b> is initialized with <b>get</b>, as all other widgets.</span></div><div><span style="font-family:arial;font-size:small">I found that <b>mpFloatWin</b> in <b>ComboBox</b> gets set to <b>0xcccccccccccccccc</b>, so I think it's not initialized properly. (I'm giving <b>get</b> the correct id from the .ui, so that's not it.)</span></div>




<div><span style="font-family:arial,sans-serif;font-size:13px">If I call either </span><b><span style="font-family:arial,sans-serif;font-size:13px">AdaptDropDownLineCountToMaximu</span></b><span style="font-family:arial,sans-serif;font-size:13px"><b>m</b> or <b>InsertEntry</b> in the ctor of </span><b>SvxColorWindow_Impl</b>, LO crashes immediately when the popup window is opened.<br>




</div><div style="font-family:arial,sans-serif;font-size:13px"><div style="font-family:arial;font-size:small">Are there any well known/typical reasons why this would happen?</div><div><br></div></div><div style="font-family:arial,sans-serif;font-size:13px">


If anyone has any insights, please share them! Thank you!<font face="arial, sans-serif"><br>


</font></div><div style="font-family:arial,sans-serif;font-size:13px"><font face="arial, sans-serif"><br></font></div><div style="font-family:arial,sans-serif;font-size:13px"><font face="arial, sans-serif">All the best,</font></div>





<div style="font-family:arial,sans-serif;font-size:13px"><font face="arial, sans-serif">Krisztian</font></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>