inputbox width
Posted
#1
(In Topic #773)
Regular

For example:-
Code
InputBox("Enter description", "Document description", sVar)Any ideas?
Gambas 3.16.3
Kubuntu 20.04
Posted
Guru

I noticed that the help file says the Prompt is rich text.
<IMG src="https://www.cogier.com/gambas/Inputbox2.png">
</IMG>So if you change the Prompt as below: -
Code (gambas)
You get: -
<IMG src="https://www.cogier.com/gambas/Inputbox.png">
</IMG>If this is not wide enough, my tests showed you could use 29 characters while using Header 1 (<h1>)
Posted
Guru

Posted
Regular

Now:-
Code
InputBox("<h1>Enter Year<h1>", "Year of the document date")looks like:-
Posted
Guru

Just copy files InputBox.class / FInputBox.class / FInputBox.form into your .src folder from the gambas source in /comp/gb.form/.src
Then rename InputBox.Class to MyInputBox.class (or something)
then you can edit the FInputBox.class file to make the window bigger
InputBox code looks kinda iffy to me.
Try this one…
I've made the InputBoxW.class take another MinWidth arg to set a min width if required
plus made it convert "\n" to "<br>"
plus made the window resize a bit differently…
Posted
Regular

With GTK inputbox works properly - the width of the textbox seems to be set by the with of text as Bruce points out.
Will give inputboxw a try
Posted
Enthusiast

I guess it depends on the distro and desktop you use which is best for you.
Since I use Ubuntu and Gnome, GTK is best for me.
There are just too many choices to make in this world
1 guest and 0 members have just viewed this.




