Re: [MSEide-MSEgui-talk] IDE mod - Procedure List

2016-10-18 Thread Graeme Geldenhuys
On 2016-10-18 14:18, Martin Schreiber wrote:
> It is a regression, please try again with git master 

Thank you, now that is working.


Regards,
  Graeme

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] IDE mod - Procedure List

2016-10-18 Thread Martin Schreiber
On Tuesday 18 October 2016 11:38:05 Graeme Geldenhuys wrote:

> But what does cbObjects.dropdown.ItemIndex := 0 do in TDropdownListEdit
> if it doesn't set the focus item?
>
It is a regression, please try again with git master 
844129cc9fb904d3f4b20f3a5a8a627f28771608, thanks for reporting.
tcustomdataedit.setdropdowntext() did not reset des_emptytext flag, it did not 
yet exist when somebody used ItemIndex the last time. :-)

Martin

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] IDE mod - Procedure List

2016-10-18 Thread Martin Schreiber
On Tuesday 18 October 2016 11:00:00 Graeme Geldenhuys wrote:
> On 2016-10-18 08:33, Martin Schreiber wrote:
> >> I'm getting there! :-) See attached screenshot.
> >
> > If you agree I'll try to make a plug-in with the modification later.
>
> Of course. I'll make the code available in my Github repository when I'm
> done. I don't mind maintaining my own custom mods for MSEide - I already
> have quite a few, but my hope is that you will find it useful enough to
> possibly include as standard at some point. ;-) A simple plug-in would
> be a useful option too.
>
The reason is that I need real use cases in order to design the plug-in 
interface.

Martin

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] IDE mod - Procedure List

2016-10-18 Thread Graeme Geldenhuys
On 2016-10-18 10:39, Martin Schreiber wrote:
>> >   cbObjects.dropdown.cols.EndUpdate;
>> >   cbObjects.dropdown.ItemIndex := 0; // SAllString is always the 1st item
>> >
> Suggestion: use a TenumEdit and set ".value:= 0;".
> TDropdownListEdit is more a TStringEdit with a text selecting help.


OK, I'll make the widget change.

But what does cbObjects.dropdown.ItemIndex := 0 do in TDropdownListEdit
if it doesn't set the focus item?


Regards,
  Graeme

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] IDE mod - Procedure List

2016-10-18 Thread Martin Schreiber
On Tuesday 18 October 2016 11:00:00 Graeme Geldenhuys wrote:

> I've change the ComboBox widget to TDropdownListEdit and your code
> suggestion does work. I can't seem to get the focus item set though.
> I use the following code to populate the combobox and set the focus item.
>
>   cbObjects.dropdown.cols.count := 0;
>   cbObjects.dropdown.cols.BeginUpdate;
>   for i := 0 to FObjectStrings.Count-1 do
> cbObjects.dropdown.cols.addrow([FObjectStrings[i]]);
>   cbObjects.dropdown.cols.EndUpdate;
>   cbObjects.dropdown.ItemIndex := 0; // SAllString is always the 1st item
>
Suggestion: use a TenumEdit and set ".value:= 0;".
TDropdownListEdit is more a TStringEdit with a text selecting help.

Martin

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] IDE mod - Procedure List

2016-10-18 Thread Graeme Geldenhuys
On 2016-10-18 08:33, Martin Schreiber wrote:
>> I'm getting there! :-) See attached screenshot.
>>
> If you agree I'll try to make a plug-in with the modification later.

Of course. I'll make the code available in my Github repository when I'm
done. I don't mind maintaining my own custom mods for MSEide - I already
have quite a few, but my hope is that you will find it useful enough to
possibly include as standard at some point. ;-) A simple plug-in would
be a useful option too.


> Please set T*grid.DataCols.ColorFocused.

Perfect, thanks again for all your help.


> The items of the "cols" property are the TDataList descendents which hold the 
> column data, so
> "
> .dropdown.cols[n].asarray:= ;

The original list of data that needs to go into the ComboBox is stored
in a TStringList. In fpGUI's Maximus IDE, I could do the following:

  cbObjects.Items.Assign(FObjectStrings);
  cbObjects.FocusItem := cbObjects.Items.IndexOf(SAllString);

I've change the ComboBox widget to TDropdownListEdit and your code
suggestion does work. I can't seem to get the focus item set though.
I use the following code to populate the combobox and set the focus item.

  cbObjects.dropdown.cols.count := 0;
  cbObjects.dropdown.cols.BeginUpdate;
  for i := 0 to FObjectStrings.Count-1 do
cbObjects.dropdown.cols.addrow([FObjectStrings[i]]);
  cbObjects.dropdown.cols.EndUpdate;
  cbObjects.dropdown.ItemIndex := 0; // SAllString is always the 1st item



> "sourcefo.activepage.filename". "sourcefo.activepage" can be nil.

Nice and simple. Thanks, that worked perfectly.



Regards,
  Graeme

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] IDE mod - Procedure List

2016-10-18 Thread Martin Schreiber
On Tuesday 18 October 2016 02:09:46 Graeme Geldenhuys wrote:
> Hi Martin,
>
> I'm getting there! :-) See attached screenshot.
>
Congrats! If you agree I'll try to make a plug-in with the modification later.

> A couple more questions.
>
>
> 1. How do I get the focused row in the StringGrid to show even when the
>grid doesn't have focus? eg: in fpGUI when the StringGrid has
>focus, the focus row will be in a Navy color, but when the grid
>doesn't have focus, the last focused row will be a Light Blue
>colour.
>
Please set T*grid.DataCols.ColorFocused.

> 2. I've managed to populate the Objects combobox. But when I open the
>dropdown list, only half of the text is displayed. From what I
>understand is that the combobox supports columns of data. It
>appears as if there a 4 column, yet I explicitly set
>  dropdown.cols.count := 1
>in the Object Inspector. The exact widget I'm using is the TSelector.
>
Please use TEnumEdit or TDropdownListEdit instead of TSelector. TSelector is a 
very special widget which can be used as base for a select widget where the 
displayed text and the text used for selecting are different. TEnumEdit maps 
text list-items to an integer, TDropdownListEdit is the nearest MSEgui 
equivalent of TComboBox.

In order to fill the dropdown list use
"
 with .dropdown.cols do begin
  beginupdate();
  addrow([,...]);
  ...
  endupdate();
 end;
".
The items of the "cols" property are the TDataList descendents which hold the 
column data, so
"
.dropdown.cols[n].asarray:= ;
"
can be used if the column data is in a dynamic arrays.

> 3. I currently hard-coded a *.pas unit to be processed. How do I
>retrieve the full file name of the current unit in the Source Editor
>window?
>
>
"sourcefo.activepage.filename". "sourcefo.activepage" can be nil.

Martin

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk