[[https://www.revelation.com/|Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community]]
==== Combo box user value width limitation (OpenInsight Specific) ====
=== At 29 JUN 2001 01:20:53PM Oystein Reigem wrote: ===
{{tag>"OpenInsight Specific"}}
When the user keys in his own value in a combo box, there's a limit to how much he can type - not more than fits within the width of the control. The edit line-like part of the combo is not like a real edit line. In a real edit line the content scrolls when you reach the right border.
Can this limitation of the combo box be overcome?
- Oystein -
----
=== At 29 JUN 2001 08:34PM Robert Lee wrote: ===
Hi Oystein
Probably not the answer you want to hear, but you could use and editline and a button with a bitmap that looks like the combobox dropdown symbol...
Robert
----
=== At 01 JUL 2001 10:32AM Oystein Reigem wrote: ===
Robert,
[i]Probably not the answer you want to hear, but you could use and editline and a button with a bitmap that looks like the combobox dropdown symbol...[/i]
Correct. Try again! :-)
I really enjoy that kind of programming, but I haven't got the time now.
What I hoped for was some style setting that would cause the editline part of the combo to scroll. Anybody with a simple solution like that step forward, please!!
Wanna see a different workaround I played around with? This is the CHAR handler of my combo. Each time a key is pressed it checks if the content threatens to hit the wall:
/* how wide is the combo? */
ComboSize=Get_Property( CtrlEntId, "SIZE" )
/* ...measured in pixels */
ComboWidth=ComboSize
/* ...measured in characters */
/* pretend each character is 10 pixels wide */
ComboLen=Int( ComboWidth / 10 )
/* how many characters have been keyed in? */
TextLen=len( Get_Property( CtrlEntId, "TEXT" ) )
/* are we running out of space? */
if ComboLen - TextLen /* yes. make the combo wider */
ComboWidth += 50
ComboSize=ComboWidth
UnUsed=Set_Property( CtrlEntId, "SIZE", ComboSize )
end
RETURN 0
Might look stupid to you, but this combo of mine is almost the sole control in a popup-like dialog I have, so if I let the handler make the window wider along with the combo it will work.
I need to measure used space in pixels, of course, but that can be done.
And make sure the user doesn't make the dialog wider than the screen or something.
- Oystein -
----
=== At 02 JUL 2001 03:35AM Simon Wilmot wrote: ===
Oystein,
Apologies if I am mis-reading your requirement, but what is wrong with checking the AutoHScroll checkbox on the properties window ???
Simon
RebusHR
----
=== At 02 JUL 2001 04:33AM Oystein Reigem wrote: ===
Simon,
Nothing wrong at all. Must get my eysight checked. I just bevr norticw it.
Thsmx!
- Ousyetin .
[[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=7165BF86B51D304185256A7A005F4C0A|View this thread on the forum...]]