I was thinking that the minwh applied to the whole form - I didn't realize
it was per field.

On Tue, Apr 28, 2015 at 8:44 AM, Raul Miller <[email protected]> wrote:

> Aha! What I thought was a problem with the static elements was the
> minwh 220 40 that you had had in ioFiles.
>
> My apologies, I should have noticed that.
>
> Thanks,
>
> --
> Raul
>
> On Tue, Apr 28, 2015 at 8:29 AM, Devon McCormick <[email protected]>
> wrote:
> > Thanks both of you for your help.  I didn't go with the grid as this
> seems
> > like too much for such a simple layout.  The key for me was to realize I
> > could work vertically first - lining up the labels with their own width
> > spec - then giving the input fields their own spec.
> >
> > This is what I ended up with:
> >
> > ioForm=: 0 : 0
> >>  bin h;
> >>    bin v; minwh 60 20;
> >>      cc inlbl static left;cn "Input file ";
> >>      cc oulbl static left;cn "Output file";
> >>    bin z;
> >>    bin v; minwh 420 20;
> >>      cc inpfl edit;
> >>      cc outpfl edit;
> >>    bin z;
> >>  bin z;
> >> )
> >
> >
> > Thanks again,
> >
> > Devon
> >
> >
> > On Tue, Apr 28, 2015 at 12:28 AM, bill lam <[email protected]> wrote:
> >
> >> Perhaps it the minwh cmd set the minimum size of
> >> inlbl, try removing that line.
> >>
> >> Вт, 28 апр 2015, Raul Miller написал(а):
> >> > I tried this:
> >> >
> >> > ioForm=: 0 : 0
> >> >  bin h;
> >> >  bin g;
> >> >    grid size 2 2;
> >> >    grid colwidth 1 300;
> >> >
> >> >    cc inlbl static left;cn "Input file ";
> >> >    cc inpfl edit;
> >> >
> >> >    cc oulbl static left;cn "Output file";
> >> >    cc outpfl edit;
> >> >  bin z;
> >> >  bin s;
> >> >  bin z;
> >> > )
> >> >
> >> > ioFiles=: 3 : 0
> >> >     wd 'pc iofiles closeok;pn "Input/Output Files"'
> >> >     wd ioForm [ wd 'minwh 220 40'
> >> >     flnm=. 'FIXME' NB. setInputFile ''
> >> >     wd 'pshow'
> >> >     wd 'set inpfl text ',flnm
> >> >     wd 'set outpfl text ',(] {.~ [:>:'/' i:~ ]) flnm  NB. Same dir
> >> >     wd 'set outpfl focus'
> >> > )
> >> >
> >> > In j803, I didn't see any reduction in the space occupied by the
> >> > static elements.
> >> >
> >> > Maybe j804 will be better?
> >> >
> >> > (Or, maybe, once again, I have overlooked something obvious?)
> >> >
> >> > Thanks,
> >> >
> >> > --
> >> > Raul
> >> >
> >> >
> >> > On Mon, Apr 27, 2015 at 11:40 PM, bill lam <[email protected]>
> wrote:
> >> > > grid size col is available in j804.
> >> > > to limit the total width of static and edit, try
> >> > >
> >> > > bin h
> >> > > bin g
> >> > > grid size
> >> > > .....
> >> > > bin z
> >> > > bin s
> >> > > bin z
> >> > >
> >> > > Also in j804, there are maxwh and sizepolicy.
> >> > >
> >> > > digia had reorganized its companies and website, documentation
> >> > > and wiki is moving to qt.io site.  Those dead links might be WIP
> >> > > or typo, I'm not sure when they will be fixed.
> >> > >
> >> > > Пн, 27 апр 2015, Raul Miller написал(а):
> >> > >> That code is incomplete.
> >> > >>
> >> > >> ioFiles mentions setInputFile which you did not define.
> >> > >>
> >> > >> That said, I think this will achieve something closer to what you
> >> want:
> >> > >>
> >> > >> ioForm=: 0 : 0
> >> > >>  bin h;
> >> > >>    bin v;
> >> > >>      cc inlbl static left;cn "Input file ";
> >> > >>      cc oulbl static left;cn "Output file";
> >> > >>    bin z;
> >> > >>    bin v;
> >> > >>      cc inpfl edit;
> >> > >>      cc outpfl edit;
> >> > >>    bin z;
> >> > >>  bin z;
> >> > >> )
> >> > >>
> >> > >> Note that the size allocated to the static elements seems
> excessive.
> >> > >>
> >> > >> You might instead want something like this:
> >> > >>
> >> > >> ioForm=: 0 : 0
> >> > >>  bin g;
> >> > >>    grid size 2 2;
> >> > >>    grid colwidth 1 300;
> >> > >>
> >> > >>    cc inlbl static left;cn "Input file ";
> >> > >>    cc inpfl edit;
> >> > >>
> >> > >>    cc oulbl static left;cn "Output file";
> >> > >>    cc outpfl edit;
> >> > >>  bin z;
> >> > >> )
> >> > >>
> >> > >> Note that space allocated to the static items will still be
> excessive.
> >> > >>
> >> > >> Note also that although the wd documentation specifies that the
> number
> >> > >> of rows can be elided in the 'grid size' command, the
> implementation
> >> > >> does not support this.
> >> > >>
> >> > >> Finally, note that
> >> > >> http://www.jsoftware.com/jwiki/Guides/JQtChildClasses#static
> refers
> >> to
> >> > >> http://doc.qt.io/doc/qt-5/richtext-html-subset.html which does not
> >> > >> exist. However,
> http://doc.qt.digia.com/4.6/richtext-html-subset.html
> >> > >> does exist and perhaps might be close enough to accurate. (Problems
> >> > >> with missing documentation seem to be an epidemic with software,
> and
> >> > >> this has been something of an ongoing issue for decades.)
> >> > >>
> >> > >> Thanks,
> >> > >>
> >> > >> --
> >> > >> Raul
> >> > >>
> >> > >> On Mon, Apr 27, 2015 at 10:30 PM, Devon McCormick <
> [email protected]>
> >> wrote:
> >> > >> > Hi -
> >> > >> >
> >> > >> > I'm attempting a simple wd form and am frustrated as it looks
> like
> >> it
> >> > >> > should be very simple but has a weird appearance for no apparent
> >> reason.
> >> > >> > My code looks like this:
> >> > >> >
> >> > >> > coclass 'Input'
> >> > >> >> ioForm=: 0 : 0
> >> > >> >> bin v
> >> > >> >> bin h;cc inlbl static left;cn "Input file ";cc inpfl edit;bin z;
> >> > >> >> bin h;cc oulbl static left;cn "Output file";cc outpfl edit;bin
> z;
> >> > >> >> bin z
> >> > >> >> )
> >> > >> >> ioFiles=: 3 : 0
> >> > >> >>    wd 'pc iofiles;pn "Input/Output Files"'
> >> > >> >>    wd ioForm [ wd 'minwh 220 40'
> >> > >> >>    flnm=. setInputFile ''
> >> > >> >>    wd 'pshow'
> >> > >> >>    wd 'set inpfl text ',flnm
> >> > >> >>    wd 'set outpfl text ',(] {.~ [:>:'/' i:~ ]) flnm  NB. Same
> dir
> >> > >> >>    wd 'set outpfl focus'
> >> > >> >> )
> >> > >> >> ioFiles_close=: 3 : 0
> >> > >> >>    wd 'pclose'
> >> > >> >> )
> >> > >> >
> >> > >> >
> >> > >> > I want it to look like this after the user selects an input file:
> >> > >> >
> >> > >> > Input file    |C:\path\to\input.txt   |
> >> > >> > Output File |C:\path\to\                |
> >> > >> >
> >> > >> > but the input field after "Input file" looks to be
> right-justified
> >> and
> >> > >> > shorter than the input field below it.  I've tried pre-filling it
> >> with
> >> > >> > spaces and such, but no luck.
> >> > >> >
> >> > >> > If I call "wd ioForm" twice, the 2nd instance of it looks the
> way I
> >> want it
> >> > >> > to but then there are two of them.  Maybe there's some mystery
> >> command I
> >> > >> > need before the first input field definition?  Anyway, it would
> be
> >> helpful
> >> > >> > if there were some working examples of using "wd" but the what
> I've
> >> found
> >> > >> > appears to be quite old - oriented to the J 6.02 wd.
> >> > >> >
> >> > >> > Any ideas or tips to help me make progress on this?
> >> > >> >
> >> > >> > Thanks,
> >> > >> >
> >> > >> > Devon
> >> > >> >
> >> > >> >
> >> > >> > --
> >> > >> > Devon McCormick, CFA
> >> > >> >
> >> ----------------------------------------------------------------------
> >> > >> > For information about J forums see
> >> http://www.jsoftware.com/forums.htm
> >> > >>
> ----------------------------------------------------------------------
> >> > >> For information about J forums see
> >> http://www.jsoftware.com/forums.htm
> >> > >
> >> > > --
> >> > > regards,
> >> > > ====================================================
> >> > > GPG key 1024D/4434BAB3 2008-08-24
> >> > > gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
> >> > > gpg --keyserver subkeys.pgp.net --armor --export 4434BAB3
> >> > >
> ----------------------------------------------------------------------
> >> > > For information about J forums see
> http://www.jsoftware.com/forums.htm
> >> > ----------------------------------------------------------------------
> >> > For information about J forums see
> http://www.jsoftware.com/forums.htm
> >>
> >> --
> >> regards,
> >> ====================================================
> >> GPG key 1024D/4434BAB3 2008-08-24
> >> gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
> >> gpg --keyserver subkeys.pgp.net --armor --export 4434BAB3
> >> ----------------------------------------------------------------------
> >> For information about J forums see http://www.jsoftware.com/forums.htm
> >>
> >
> >
> >
> > --
> > Devon McCormick, CFA
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
Devon McCormick, CFA
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to