Working on my data entry screen...
Sometimes, there are just a few fields:
And, sometimes, there are a lot:
I generate the data entry screen dynamically on a basis of a definition file and I use iupScrollbox to manage scrollbars, in the event that there are more fields than can fit on the screen at one time.
So, my first problem...
iupScrollbox does not seem to add scrollbar properly. When it adds the vertical scrollbar, it causes a horizontal scrollbar to appear also; it seems that it's not taking the space occupied by the vertical scrollbar into account.
Is there a solution?
Thanks
* iupScrollbox woes
-
- Superstar
- Posts: 280
- Joined: 13 May 2015 16:28
- Family Historian: V7
- Location: Mitzpe Jericho, Israel
iupScrollbox woes
Shosh Kalson
- tatewise
- Megastar
- Posts: 28488
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: iupScrollbox woes
I have tried setting SCROLLBAR="VERTICAL" instead of the default "YES" but that makes no difference.
The only way I could eliminate the horizontal scrollbar was to force the SIZE of the dialogue to be wider.
e.g.
The only way I could eliminate the horizontal scrollbar was to force the SIZE of the dialogue to be wider.
e.g.
Code: Select all
local strSize = dlg.SIZE
local intWidth = tonumber( strSize:match( "^(%d+)x" ) ) + 30 -- Increase width by 30
dlg.SIZE = strSize:gsub( "^%d+", tostring(intWidth) ) -- Make dialogue wider
iup.Map(dlg)
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
-
- Superstar
- Posts: 280
- Joined: 13 May 2015 16:28
- Family Historian: V7
- Location: Mitzpe Jericho, Israel
Re: iupScrollbox woes
Where do you put this code? If I put it right after creating the dialog, it makes a narrow window.
Shosh Kalson
- tatewise
- Megastar
- Posts: 28488
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: iupScrollbox woes
Put it after you have populated all the fields and the dialogue has been mapped.
e.g.
e.g.
Code: Select all
dlg:showxy(iup.CENTER, iup.CENTER)
local strSize = dlg.SIZE
local intWidth = tonumber( strSize:match( "^(%d+)x" ) ) + 30
dlg.SIZE = strSize:gsub( "^%d+", tostring(intWidth) )
iup.Map(dlg)
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry